My organization has several nuget v2 feeds (.net app consuming nuget.server) for our internally developed packages and to re-host third party packages (since our build machines do not have internet access and we audit what packages developers consume within our product and would like the builds to fail if we don't have a package).
Whenever I add any packages that require nuget client 3.0+ to my nuget servers, the nuget server crashes because it cannot read metadata from those packages. How do i host my own nuget v3 server / upgrade my existing nuget servers to be v3 compatible?
In visual studio, select Preferences from the menu bar. Select NuGet, and then select Sources. Select Add, and then enter your feed's name, the source URL, a userName (any string), and your personal access token. Select OK.
Now that the feed contains packages it can be used the same as any other NuGet feed. NuGet v3 feed URLs must contain the path full path to index.json, so for an Azure storage account it will look like this: The URL can be added to your NuGet.Config file, either for your project or to the machine wide NuGet config at %appdata/NuGet/NuGet.Config
Use Azure DevOps New Signature / Blog / Want to host your private NuGet feed? Use Azure DevOps When adding features to a project in Visual Studio, you can do so by directly referencing the libraries as individual dlls or a collection of dlls as a NuGet package.
Simply said, NuGet.Server makes a folder on the server available through HTTP(S) (specifically OData). It's easy to set up and is best for simple scenarios. Create an empty ASP.NET Web application in Visual Studio and add the NuGet.Server package to it. Configure the Packages folder in the application and add packages.
There are also several other NuGet hosting products such as Azure Artifacts and GitHub package registry that support remote private feeds. Below is a list of such products: Artifactory from JFrog. Azure Artifacts, which is also available on Team Foundation Server 2017 and later.
I wrote a nuget server aspnetcore middleware recently.
Of cource the implementation is so foolish, ugly etc... link
You can set up it in the Startup.cs
public void ConfigureServices( IServiceCollection services )
{
...
services.AddNugetServer(opt=>
{
opt.ApiKey = "This is a string used for adds or deletes your package(s)";
opt.PackageDirectory = "/path/to/your/packages"; //default is current path + "/packages"
});
...
}
public void Configure( IApplicationBuilder app, IHostingEnvironment env )
{
...
app.UseNugetServer();
}
And visit http(s)://your-server-address[:port]/v3/index.json
Publishing:
dotnet nuget push -s http(s)://your-server-address[:port]/v3/package package.nupkg
I have had the same problem, and have done some research. You might already have solved Your problem, but here NuGet themselves lists a few alternatives to look into; both free and paid: Hosting Your Own NuGet Feeds
In short, the list is
I have just tested ProGet, but that one seems not up to date with v3 even if it was easy to install and free.
I might just switch to the TeamCity native one, as soon as they get the feature to handle v3 feeds.
Currently I am testing NuGet Server that can be downloaded as package via
Install-Package NuGet.Server
in the Package-Manager in Visual Studio in a new, empty web application for .Net 4.5.x.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With