【发布时间】:2016-01-13 19:57:19
【问题描述】:
参考本帖:Previous Question
我已经尝试了提出的各种解决方案,但“在 lib 文件夹外组装”错误仍然存在。
我在其他项目中使用了下面的 nuspec 文件格式,它工作正常下面是我的 nuspec 文件:
<?xml version="1.0"?>
<package >
<metadata>
<id>Workflow.Assembly</id>
<version>1.0.0.0</version>
<title>Workflow.Assembly</title>
<authors>MyAuthor</authors>
<owners>MyOwner</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>My Description</description>
<releaseNotes>My Release notes</releaseNotes>
<copyright>Copyright 2016</copyright>
<tags>My Tags</tags>
</metadata>
</package>
powershell 命令行: nuget spec MyProject.csproj(创建 nuspec 文件的外壳,编辑后看起来像上面的示例)
nuget 包 MyProject.csproj -IncludeReferencedProjects (输出样本) 警告:在包“MyAssembly”中发现 11 个问题。
问题:lib 文件夹外的程序集。 说明:程序集“content\lib\MyReferenced.dll”不在“lib”文件夹中,因此在将包安装到项目中时不会将其添加为参考。 解决方案:如果需要引用,请将其移至“lib”文件夹中。
我已经尝试了上一个问题中提到的各种 <files /> <dependency /> 修饰符组合,但仍然出现错误。
这个“lib”文件夹指的是哪个文件夹,我怎样才能获得 nuget 期望依赖 dll 驻留的绝对路径(如果路径是它想要的)?
【问题讨论】: