NuGet"在lib文件夹外组装" - ASP.NET - 复制或移动文件?

时间:2014-06-25 10:02:09

标签: asp.net nuget

在我简单的ASP.net webservice中,我得到了lib文件夹外的NuGet"程序集" 2种情况下的警告:

  1. 对于我的项目中引用的库
  2. 我的主要项目大会
  3. DLL实际上打包在nupkg文件中(分别在/ content和/ tools文件夹中)。

    我应该如何配置我的项目?

    1. 将2个DLL文件复制到/ lib文件夹?
    2. 将2个DLL文件从当前位置移动到/ lib文件夹?
    3. 别的什么?
    4. 我已查看nuget-assembly-outside-lib-folder问题的答案。

      下面构建转储

      我的项目警告中引用的库:

      [10:20:34][pack] Issue: Assembly outside lib folder.
      [10:20:34][pack] Description: The assembly 'content\(referenced library).dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
      [10:20:34][pack] Solution: Move it into the 'lib' folder if it should be referenced.
      

      主要项目组装警告:

      [10:20:34][pack] Issue: Assembly outside lib folder.
      [10:20:34][pack] Description: The assembly 'tools\(my assembly).dll' is not inside the 'lib' folder and hence it won't be added as reference when the package is installed into a project.
      [10:20:34][pack] Solution: Move it into the 'lib' folder if it should be referenced.
      

      我觉得奇怪的是,当.nuspec文件没有被篡改时,一个简单的ASP.NET项目的默认构建过程应该以不合规的方式打包文件。

1 个答案:

答案 0 :(得分:3)

我也添加了对引用问题的回答,但您可以让构建服务器在普通文件夹中构建.dll文件,然后对.csproj文件而不是.nuspec文件使用nuget pack。它将获取.nuspec文件中的信息,但它似乎在.csproj文件的帮助下更好地找到了程序集。类似的东西:

nuget pack simple.csproj -IncludeReferencedProjects
相关问题