Пакет Nuget не включает себя как зависимость

Я создаю пакет 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

1 ответ

Решение

Если кому-то еще интересно, все, что вам нужно сделать, это добавить еще одну строку к файлам и ссылаться на свою dll следующим образом:

<file src="bin\Debug\DTOCodeGenerator.dll" target="lib"/>
Другие вопросы по тегам