I was trying to add a content file to a package I was creating, in my case an XML config file.
In my situation I want a user doing a PackageReference to see the file in Visual Studio and for the file to be copied to the output directory on a build.
So I added something like
<ItemGroup> <Content Include="Foo.config" PackFolder="contentFiles\any\any" BuildAction="None" CopyToOutput ="true" /> </ItemGroup>
When the resultant packege that is build is referenced I see the Foo.config appear. However it's properties are
BuildActrion = C# compiler
Copy to Output Directory = Do Not copy
Based on the readme stuff I have tried every variant of the packaging line I can think of and nothing seems to work and I can't find any good examples of this. So I am starting to wonder if I am missing something obvious or if this doesn't work.
I was trying to add a content file to a package I was creating, in my case an XML config file.
In my situation I want a user doing a PackageReference to see the file in Visual Studio and for the file to be copied to the output directory on a build.
So I added something like
<ItemGroup> <Content Include="Foo.config" PackFolder="contentFiles\any\any" BuildAction="None" CopyToOutput ="true" /> </ItemGroup>When the resultant packege that is build is referenced I see the Foo.config appear. However it's properties are
BuildActrion = C# compiler
Copy to Output Directory = Do Not copy
Based on the readme stuff I have tried every variant of the packaging line I can think of and nothing seems to work and I can't find any good examples of this. So I am starting to wonder if I am missing something obvious or if this doesn't work.