MonoGame Pipeline (Resolved)

Hi, all. I am newbie so thanks for your patience. In a new Windows OpenGL project in Visual Studio 2015, I have been under the impression that you can double click “Content.mgcb” under the solution explorer and that this will automatically launch the MonoGame Pipeline, opening the file with the content root visible. It launches the pipeline tool but does not open the file. I still have to manually open the file from within the pipeline, build my content, have it copied, etc. Even after this it still has the same behavior. It seems like this defeats the purpose of choosing to open your content file with the pipeline from the solution explorer because the pipeline only opens with whatever file you last had open or none if you had closed it previously before exiting. Also, after I build my content and have it copied into the project, A second “Content.mgcb” file shows up in the solution explorer and they appear to be identical. However, the properties of the new one are “Build action: Content. and Copy to Output Directory: Copy if newer.” The other file has the default properties of “MonoGame Reference” and “Do not copy.” While manually browsing to the directory in Windows Explorer there is only one file. Deleting one from within the Visual Studio Solution Explorer breaks the content build. I am OCD so I don’t like having unnecessary, accidental redundancies so I am just wondering: Is this normal? I suppose it is but I just wanted to make sure because none of this behavior has been observed in the tutorials I have been reading and watching. Thanks!

I just drop my pngs directly into the content folder(however I do have to do atleast 1 build with the Pipeline before it detects the content folder for some reason…)

That was a bug in the 3.4 release… it depended on what the path was to the file if it worked or not. We fixed this for 3.5.

That is very odd… did you create a second Content.mgcb file? You just need the one.

Thanks for your reply, Tom. I just updated to 3.5 with the latest development build.

According to the Using The MonoGame Pipeline documentation I added these lines to my csproj file to make things automatic:

<ItemGroup>
<Content Include="Content\**\*.*">
  <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

By deleting the solution and starting fresh, before doing any content builds, I found out that simply adding this code to the .csproj file is responsible for copying the content reference file generated by the new project. If I delete the duplicate, it deletes both the file itself and the original reference file, breaking the content.

I’m still not exactly sure how I content is supposed to work but i am trying to make sure I am doing everything correctly. I can’t figure out how to correctly link content to the project without adding those lines of code to the .csproj file.

I just determined that everything works fine in a regular Windows project. However, I was intending to create a cross platform project and just realized my OpenGL project was for Windows only. I think the problem has to do with some content bugs in that type of project. Because I just created an actual Cross Platform OpenGL project and everything works completely fine and I don’t have to copy any XNB files or add those lines of code to the .csproj file after building my content in the pipeline tool.

Consider this thread resolved.