Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Set Copy always in a nuget package

$
0
0

I generate a nuget package from a project which includes the following code in .csproj file:

<ItemGroup><Content Include="readme.txt" ><IncludeInPackage>true</IncludeInPackage><Pack>true</Pack><BuildAction>Content</BuildAction><copyToOutput>true</copyToOutput><CopyToOutputDirectory>Always</CopyToOutputDirectory><PackageCopyToOutput>true</PackageCopyToOutput></Content></ItemGroup>

When I add the nuget into my actual project the readme.txt is added without any issues. The problem is that "Copy to output Directory" property is always set to "Do not copy", instead of "Always copy" regardless the command "CopyToOutputDirectory" was set to "Always".Is it possible to set "CopyToOutputDirectory" property to "Always copy" via .csproj file or I have to write PowerShell script for this purpose.


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>