Reputation: 93
I have created nuget package (.nupkg) and hosted that package directly on one of http servers
http://someserver/location/sub-location/nuget/MyPackage.1.0.0.nupkg
So if i just copy paste this URL in browser, packages gets downloaded immediately.
But, I want to download this package as part of nuget restore command.
I have used section in nuget.config file to download package from Folders, nuget.org, artifactory etc. But this particular case not working.
I don't want to run additional command to download package (for example, i don't want to use Curl )
I want some configuration done so that i can download this package in same way as other packages from other nuget repositories . I don't want to run nuget server for hosting.
Thanks, Atul
Upvotes: 2
Views: 676
Reputation: 15021
Sleet is a static NuGet feed generator. Using it, you can generate files and use any web server to serve static files.
However, since this includes a static response to search queries, if anyone uses this feed with Visual Studio's Package Manager UI, it doesn't matter what search terms they type, they'll always get the same search results. When VS searches a package source, it requests a maximum of 25 results, but since Sleet is static, it returns the entire list of every package in the feed. Before Visual Studio 2019 16.7, NuGet would show all the search results and if the Sleet feed contained enough packages, it would crash VS with an out of memory exception. VS was changed to only take the first 25 results and ignore the rest, so it will no longer crash. But this means that it's impossible now in PM UI to see more than the first 25 packages. If search results are not important to you, the Sleet sounds like a good fit.
Upvotes: 1