I am wanting to use source control with Visual Studio for game development with monogame. Monogame now has its own content manager that you can use to add new assets (like sprites, music, fonts etc.) When you add content into the content manager it actually creates folders in the content directory on your local disk where your project resides.
However because you did not add the content in Visual Studio they are not part of the project. By clicking on 'Show all files'
, I can see the folders and assets the content manager created and i could simply just right click and include those in my project. The problem is that i want to check in my project using source control, so i don't want to have to do this every single time i add a file through monogames content manager.
What I would like is to find some way to set the project up so that any files added to the project directory are automatically added to my project.
That way i could check in my project and all my content would be included without having to manually include it every time.
Any help would be greatly appreciated, I am currently using Visual Studio 2015 Enterprise.
What you want to is edit your visual studio project file (.csproj) to add files by using wildcards.
You can do this by right-clicking your project, and choosing "Unload Project" and then "Edit .csproj" and adding something along these lines:
<ItemGroup>
<Content Include="Content\**\*.*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
As long as your output directories from the content builder match the directories in the content include tag, you should be fine.