如何在 nuget 错误中找到 "lib" 文件夹?

How do I locate the "lib" folder in nuget error?

引用此线程:Previous Question

我已经尝试了提出的各种解决方案,但 "Assembly outside lib folder" 错误仍然存​​在。

我在其他项目中使用了下面的 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 文件的 shell,编辑后看起来像上面的示例)

nuget 包 MyProject.csproj -IncludeReferencedProjects (输出样本) 警告:在软件包 'MyAssembly'.

中发现 11 个问题

问题:程序集位于 lib 文件夹之外。 说明:程序集 'content\lib\MyReferenced.dll' 不在 'lib' 文件夹中,因此在将包安装到项目中时不会将其添加为引用。 解决办法:如果要引用就移到'lib'文件夹中。

我已经尝试了上一个问题中提到的各种 <files /> <dependency /> 修饰符组合,但仍然出现错误。

此 "lib" 文件夹指向哪个文件夹,我如何获得 nuget 期望依赖的 dll 所在位置的绝对路径(如果路径是它想要的)?

向 nuspec 添加一个 'files' 部分,将项目的输出链接到 'lib' 文件夹。

<files>
  <file src="bin\Release\MyAssembly.???" target="lib" />
</files>

https://docs.nuget.org/create/nuspec-reference