I have a Visual Studio 2013 project that uses Nuget. I have a packages.config file in the root directory of the solution, defining the Nuget packages we want installed. I also have a nuget.config file in the root directory of the solution, defining packageSources, as well as some packageSourceCredentials. One of the package sources is a private repo for our company.
If I open a command prompt in that root directory of the solution, and type nuget restore
it works fine, and is able to hit our private repos to pull in some of the custom packages we use.
But if I open the solution in Visual Studio 2013, and build it, it fails when trying to download our custom packages, because apparantly it is ignoring our nuget.config file, and thus does not know about our private nuget repo.
I could go into Tools > Options and add our private repo, but we're trying to do everything within the solution itself, so that it builds out-of-the-box with no custom configuration needed.
Why is nuget.config being ignored by VS 2013?
Restore packages manually using Visual Studio Enable package restore by choosing Tools > Options > NuGet Package Manager. Under Package Restore options, select Allow NuGet to download missing packages. In Solution Explorer, right click the solution and select Restore NuGet Packages.
If you're trying to create a NuGet package from your own code, you do not need a NuGet. config file. The NuGet. config file exists to specify package sources from which packages are installed and updated - i.e. where you consume packages from.
Restart Visual Studio after editing NuGet.config!
I've noticed that VS2012 doesn't pick up on changes to NuGet.config until after I restart it.
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