ArgumentNullException for autocompleteUrl using Azure Artifacts feed
See original GitHub issueWhen using NuGetClient
with an Azure Artifacts feed, calling GetPackageMetadataAsync
throws an ArgumentNullException
for autocompleteUrl
.
To Reproduce
- Create a public Azure Artifacts NuGet feed. I have an empty one at https://pkgs.dev.azure.com/mysqlnet/MySqlConnector/_packaging/test/nuget/v3/index.json
- Install BaGet.Protocol 0.3.0-preview2
- Run this code:
var client = new NuGetClient("https://pkgs.dev.azure.com/mysqlnet/MySqlConnector/_packaging/test/nuget/v3/index.json");
await client.GetPackageMetadataAsync("Test");
- There’s an unhandled exception:
ArgumentNullException: Value cannot be null. (Parameter 'autocompleteUrl')
at BaGet.Protocol.Internal.RawSearchClient..ctor(HttpClient httpClient, String searchUrl, String autocompleteUrl) in D:\a\1\s\src\BaGet.Protocol\Search\RawSearchClient.cs:line 33
at BaGet.Protocol.NuGetClientFactory.GetAsync[T](Func`2 clientFactory, CancellationToken cancellationToken) in D:\a\1\s\src\BaGet.Protocol\NuGetClientFactory.cs:line 151
at BaGet.Protocol.NuGetClientFactory.PackageMetadataClient.GetRegistrationIndexOrNullAsync(String packageId, CancellationToken cancellationToken) in D:\a\1\s\src\BaGet.Protocol\PackageMetadata\PackageMetadataClient.cs:line 24
at BaGet.Protocol.NuGetClient.GetPackageMetadataAsync(String packageId, CancellationToken cancellationToken) in D:\a\1\s\src\BaGet.Protocol\NuGetClient.cs:line 200
Expected behavior
That BaGet.Protocol should be able to retrieve package metadata from Azure Artifacts, even if all NuGet API v3 services aren’t exposed.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Cannot push packages to azure artifacts feed, keeps ...
I've been pushing packages before but for some reason it now stops working. I've got a feed setup and I got full owner...
Read more >Configure permissions - Azure Artifacts
How to configure permissions for Artifacts feeds, views, and pipelines access.
Read more >Get started with NuGet packages and Azure Artifacts
Azure Artifacts enables developers to publish and download NuGet packages from different sources such as feeds and public registries.
Read more >Migrate from file shares - Azure Artifacts
How to migrate from file shares to Azure Artifacts. ... Azure Artifacts maintains an index of packages within each feed, allowing for quick ......
Read more >Publish & download Universal Packages - Azure Pipelines
The Universal Packages task in Azure Pipelines is set to use $(Build.ArtifactStagingDirectory) as the default publish directory.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Confirmed that preview3 works great; thanks!
Thanks for reporting! I’ll do two fixes: