Nuget 包不包括自我作为依赖项

Nuget Package is not including self as a dependency

我正在从 class 库创建一个 nuget 包。我有明确的文件包含,但工作正常,但我的 dll 未包含在包中。我的印象是,默认情况下 nuget 包会将自身作为 dll 包含在包中,我可能会误会。我的 nuspec 文件如下所示:

<?xml version="1.0"?>
  <package >
    <metadata>
      <id>DTOCodeGenerator</id>
      <version>1.0.0.1</version>
      <title>DTO Code Generator</title>
      <authors>Short Circuit</authors>
      <owners>J5</owners>
      <requireLicenseAcceptance>false</requireLicenseAcceptance>
      <description>DTO Code Generator Includes the needed include tt files to generate interface backed DTO's with adapter generation</description>
      <releaseNotes></releaseNotes>
      <copyright>Copyright 2017</copyright>
      <tags>DTOGenerator T4</tags>
      <dependencies>
        <dependency id="EntireOne.Shared.T4" version="2.0.10.24" />
      </dependencies>
    </metadata>
    <files>
      <file src="T4Generators\AutoMapperExtensions.ttinclude" target="content\T4Generators\AutoMapperExtensions.ttinclude"/>
      <file src="T4Generators\ConstGenerator.ttinclude" target="content\T4Generators\ConstGenerator.ttinclude"/>
      <file src="T4Generators\DTOGenerator.ttinclude" target="content\T4Generators\DTOGenerator.ttinclude"/>
      <file src="T4Generators\EnumGenerator.ttinclude" target="content\T4Generators\EnumGenerator.ttinclude"/>
    </files>
  </package>

如何将我当前的 dll 添加到 nuget 包中

万一其他人想知道您所要做的就是向文件添加另一行并像这样引用您的 dll:

<file src="bin\Debug\DTOCodeGenerator.dll" target="lib"/>