With classic .Net projects, if I added a reference to a NuGet package, it would get downloaded to a packages folder and I could check that into source control along with the rest of my code. This allowed any developer to download the code, along with the NuGet packages, without having to set up a package source to separately download the packages. This is not how .Net Core projects work. There does not seem to be a packages folder for the solution, and it is up to each developer to set up the custom package source and download the packages when they get the code. Is there a way to configure the .Net Core project to do like the classic .Net projects did and manage a packages folder?
相关问题
- Importing NuGet references through a local project
- Dotnet Core API - Get the URL of a controller meth
- Why am I unable to run dotnet tool install --globa
- Singleton with AsyncLocal vs Scope Service
- What SQLite NuGet package do I need
相关文章
- dotnet restore还原nuget包时无法加载 https://api.nuget.org/
- DotNet Core console app: An assembly specified in
- EF Core 'another instance is already being tra
- Re-target .NET Core to net471, net 472
- Publishing a Self-contained Console app fails
- Calling a .Net Framework 4 (or Mono) assembly from
- Can't get deleted items from OpenLDAP Server u
- proper way to sign .net core assembly
A lot of NuGet behaviour can be controlled via
NuGet.Config
files (See this reference for more details)If you place a
NuGet.Config
file next to the solution with the following content, you can override the location that the packages will be restored into:If the problem is that you'd need to set up additional sources in VS on every machine, you can also add those sources via a NuGet.Config in your repository so VS will pick up the feeds to use when opening a solution:
If you have no feed to host packages and need to include packages with the solution, you can use a directory containing
.nupkg
files as well in NuGet.Config: