在我们现有的解决方案中,我们有一个NuGet.Config文件,其内容如下:
In our existing solution we have a NuGet.Config file with the following content:
<?xml version="1.0" encoding="utf-8"?> <configuration> <solution> <add key="disableSourceControlIntegration" value="true" /> </solution> <config> <add key="repositorypath" value="NuGetPackages" /> </config> </configuration>通过此配置,我们告诉NuGet将所有软件包存储在"NuGetPackages"文件夹中.这对于我们所有现有项目(WebApi,库等)都可以正常工作,但是如果我添加一个新的ASP.NET Core项目,则程序包将存储在C:\Users\<username>\.dnx\packages文件夹中.
With this config we tell NuGet to store all packages in the "NuGetPackages" folder. This works fine for all our existing Projects (WebApi, Libraries, ...), but if I add a new ASP.NET Core project, the packages are stored in the C:\Users\<username>\.dnx\packages folder.
是否可以在解决方案级别更改软件包文件夹?
Is there a way to change the package folder on solution level?
谢谢!
推荐答案是的,您可以使用global.json来实现:
Yeah, you can use the global.json for that:
{ "packages": "NuGetPackages", "projects": [ "src", "test" ], "sdk": { "version": "1.0.0-rc1-update1" } }请参阅: github/aspnet/Home/wiki/Package-位置
更多推荐
ASP.NET Core 1.0中的Nuget配置
发布评论