-
Create a folder named
Content
under the Project Folder. -
Add to the XNA Windows project file:
<PropertyGroup>
<PostBuildEvent>xcopy "$(ProjectDir)$(OutDir)Content\*.*" "$(ProjectDir)Content" /S /I /R /Y</PostBuildEvent>
</PropertyGroup>
- Add to the MonoGame project file:
<Content Include="Content\\**\*.xnb">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- Add to .gitignore:
*.xnb
- Add new file
(ProjectFolder)\Content\ReadMe.txt
:
The compiled XNB content files should be automatically copied into this folder when doing an XNA Windows build.
These files are necessary to build and run the MonoGame version of the application.