如何告诉Asp.Net Core将nuget包保存在特定文件夹中?

时间:2017-11-22 18:02:41

标签: asp.net asp.net-mvc-4 asp.net-core

在创建项目并下载nuget依赖项时,在Asp.Net MVC4上,它创建了一个package.json,其中包含已安装的所有依赖项的所有id和值。同时,在应用程序的根目录下创建了一个包文件夹,保存了所有的nuget包。但这是可自定义的,您可以选择编写Nuget.config文件以将所有nugets指向特定文件夹。 那个结构看起来像这样。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="$\..\MyFolderRepository\Packages" />
  </config>
</configuration>

使用Asp.net核心,我不知道这些软件包的保存位置。在obj文件夹中,您可以找到包含所有依赖项配置的project.assets.json,但即便如此,我也无法确定它们存储在何处。例如,bellow是Automapper依赖配置,但存储哪个magic lib文件夹?以及如何更改依赖项的存储库文件夹?

"version": 3,
  "targets": {
    ".NETCoreApp,Version=v2.0": {
      "AutoMapper/6.2.1": {
        "type": "package",
        "dependencies": {
          "Microsoft.CSharp": "4.3.0",
          "NETStandard.Library": "1.6.1",
          "System.Collections.Concurrent": "4.3.0",
          "System.Collections.Specialized": "4.3.0",
          "System.ComponentModel.TypeConverter": "4.3.0",
          "System.Dynamic.Runtime": "4.3.0",
          "System.Linq.Queryable": "4.3.0",
          "System.Reflection.Emit": "4.3.0",
          "System.Resources.ResourceManager": "4.3.0",
          "System.Runtime.Serialization.Primitives": "4.3.0",
          "System.Text.RegularExpressions": "4.3.0"
        },
        "compile": {
          "lib/netstandard1.3/AutoMapper.dll": {}
        },
        "runtime": {
          "lib/netstandard1.3/AutoMapper.dll": {}
        }
      },

0 个答案:

没有答案