Skip to content

Do BuildAction and CopyToOutput work? #143

@davidhunter22

Description

@davidhunter22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions