• Runtimes
  • [XNA] Parse Errors On Windows Phone 7

Hi, when I try to build Spine for Windows Phone 7 using XNA I get the following error.

"No overload for method 'Parse' takes 2 arguments"

105: page.minFilter = (TextureFilter)Enum.Parse(typeof(TextureFilter), tuple[0]);
106: page.magFilter = (TextureFilter)Enum.Parse(typeof(TextureFilter), tuple[1]);

Any ideas how I can fix it or if I am doing something wrong?

Related Discussions
...

How many arguments does Enum.Parse take for you?

It seems to only have an overload for 3.

public static Object Parse(
	Type enumType,
	string value,
	bool ignoreCase
)

I've tried adding the ignoreCase boolean but that gives more errors.

When I run it on my Windows Phone 7 it just hangs at the loading screen.
When I run it on my Windows Phone 8 using the Windows Phone 7 Build I get an "unhandled exception of type 'System.MethodAccessException' occurred in System.Windows.ni.dll"

I'll try running the example project and see what happens with that, it may help shed some light on the issue.

The example project suffers from the same problems, it seems to be this line which causes the problem:

Line 67: using (StreamReader reader = new StreamReader(path)) {

Fixed Enum.Parse, thanks.

I don't know about Windows phone really. Maybe it needs its own loading code like WINDOWS_STOREAPP?

No worries. You may well be correct there, I'll have a look and see if I can figure it out.

I've managed to fix it so that it works on Windows Phone and shouldn't break anything else in the process. I've sent a pull request for you to have a look over the code and see if it's worth merging in. Hopefully I did the pull request properly, I've never sent one before now.

Merged, thank you! 🙂