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

后端 未结 1 1793
佛祖请我去吃肉
佛祖请我去吃肉 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    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.

    
        true
    
    

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

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