How do you set nuget contentFiles CopyToOutput value to true when using a .Net Standard library .csproj?

后端 未结 1 1788
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-20 12:09

I\'ve been looking for any way to set the CopyToOutput attribute to true for content files I\'m including in a nuget package built in VS2017 from a .Net Standard Library pro

相关标签:
1条回答
  • 2020-12-20 12:44

    see https://github.com/NuGet/NuGet.Client/pull/1450 Allow specifying copyToOutput and flatten as Metadata on Content items when packing sdk csproj

    You'll need to set PackageCopyToOutput to true in the source csproj for the content.

    <Content Include="...">
        <PackageCopyToOutput>true</PackageCopyToOutput>
    </Content>
    

    and once build the package, it will include CopyToOutput="true" for that content.

    0 讨论(0)
提交回复
热议问题