tags:

views:

31

answers:

1

In my project (an XNA .contentproj) I have files that need compiling, and files that just need to be copied to the output directory:

    <Compile Include="Foo.cs" />
    <None Include="Bar.xml">
        <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </None>

This works fine when i'm compiling from visual studio, but when I build the project from the command line, these 'None' files are not copied to the output directory. I tried setting the copy to 'Always' as well.

How can I tell msbuild it should do that?

EDIT: I found out this is only for XNA .contenproj msbuild files. Maybe I'm missing some msbuild parameters.

+1  A: 

Just make it e.g.

<None Include="Bar.xml">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

(if you change the properties inside VS, it should do that).

Brian
Hmm ok, i have the CopyTuOutputDirectory set as PreserveNewest, which doesn't work. I'll try setting to 'Always'.
Waldo Bronchart
Unfortunately, that didn't work either. Sorry, I should have specified this in my question.
Waldo Bronchart