Modified MetroHelper.AppDataFileExists to correctly work with files insi... #858

merged 1 commit into from Oct 15, 2012


None yet

3 participants

Contributor nested folders.

The current code doesn't handle cases where a the file is nested inside folders correctly. This methods handles that case and doesn't incorrectly throw a ContentLoadException.


We to be honest that method and its caller should not exist to begin with.

MetroHelper.AppDataFileExists() is only used from the ContentManager.Normalize<>() calls. That is the old junk used to work around the content pipeline and allow the ContentManager to process files not packaged in XNBs. That system is an abomination that still lives because the content pipeline tools have not been finished yet.

That said... the Windows Metro code does not require that hack. You can completely use the stock XNA content pipeline tools in VS2010 to build content for a Metro MonoGame game.

IMO MetroHelper.cs should be removed and the Normalize() methods and the fallback to use them in the ContentManager should all be #if out for WinRT.


I see. IMO, the problem with doing that is - we'll HAVE to use the XNA content pipeline, which probably means installing XNA Game Studio which has known compatibility problems with Windows 8. I prefer using the raw assets and am doing so for all platforms except Windows+XNA. Also - can we add a contentproj reference to a Metro game? If not, asset import will become a two stage process - first run them through the content processor and THEN add them to the project. I can see that modifying/editing assets will be a pain given that workflow, as opposed to just rebuilding them after modifying the linked (copy to output if newer) asset.

In either case - I needed it to even get my PNG assets loaded and therefore would like to see this change in the main repo so I can add it as a submodule as opposed to my own fork. Do let me know how to proceed! Thanks!


I have no problem with this change going in now, with the proviso that it
will disappear when we get our content pipeline in place.

I am currently using the two-step process you describe, running VS2010 with
XNA GS 4.0 (from the WP 7.1.1 SDK) on one monitor and VS2012 with MonoGame
on the second monitor.


we'll HAVE to use the XNA content pipeline

You will have to use the content pipeline with MonoGame within the next few months.

XNA Game Studio which has known compatibility problems with Windows 8

We use it on Windows 8 just fine. Making it install correctly is simple and documented.

can we add a contentproj reference to a Metro game?

Not at the moment... the WP8 SDK will allow it, but for now you need to create a VS2010 project and copy the content over when your done.


Ok, that sounds good - I would be ok to get rid of these changes when a proper content pipeline in put in place. As it is, the current code doesn't work in certain cases that's definitely a problem.

@KonajuGames KonajuGames merged commit ebd4da6 into MonoGame:develop3d Oct 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment