Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nuget.config is ignored, specifically the repositoryPath

Visual Studio 2015 ignores my nuget.config that lies in the solution directory. This file has the following content:

<?xml version="1.0" encoding="utf-8"?>
<settings>
  <repositoryPath>../packages/nuget</repositoryPath>
</settings>

Visual Studio however simply puts all packages into the packages folder in the solution directory.

This file has worked fine for years when using Visual Studio 2013. Am I missing something?

I am using the latest version of the NuGet extension (3.2)

like image 448
Daniel Hilgarth Avatar asked Oct 12 '15 20:10

Daniel Hilgarth


People also ask

Do I need a NuGet config file?

Add a nuget. config file in the root of your project repository. This is considered a best practice as it promotes repeatability and ensures that different users have the same NuGet configuration. You may need to configure clear elements to ensure no user or machine specific configuration is applied.

How do I change the default location of a NuGet package?

Open %AppData%\NuGet folder, open existing NuGet. Config file. Edit repositoryPath key and set new destination.

Where are NuGet credentials stored?

Globally: to make a credential provider available to all instances of nuget.exe run under the current user's profile, add it to %LocalAppData%\NuGet\CredentialProviders .


1 Answers

Looks like the format I used so far is no longer supported.

The following file works:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="..\packages\nuget" />
  </config>
</configuration>
like image 151
Daniel Hilgarth Avatar answered Oct 25 '22 23:10

Daniel Hilgarth