Getting Tests Running

Topics: Sample Code and Demos
Apr 3, 2014 at 11:48 AM
I am attempting to get the tests running. Currently, I get an exception being thrown at this line:

Microsoft.Xna.Framework.Graphics.Effect (Effect.cs)
private static EffectParameterCollection ReadParameters(BinaryReader reader)
{
.
default:
    throw new NotSupportedException();
.
}
In researching this, I noted that in comparison in the standard MonoGame code base for this same class member function, the code snippet is:
default:
   // NOTE: We skip over all other types as they 
   // don't get added to the constant buffer.   
   break;
So should I go ahead and modify the code to mimic the standard MonoGame code-base to get the tests running or what do you think.

Let me know if you get a chance.

Cheers,
Bill

P.S. Did I mention this is a cool framework?
Coordinator
Apr 3, 2014 at 4:25 PM
Hey Bill, so what platform are you using? All of the tests work on all platforms except for PSM.
Apr 4, 2014 at 1:31 PM
Here are the details:
  • Platforms: Android - on device with Nexus 5; WP8 - on device with Nokia 1020
  • VS 2013 Ultimate
  • Cocos2d-XNA code-base pulled about 1 month ago
It's good to get your input that you have tests working on the platforms I tried to get working. I'll periodically return to attempting to get this working and put more review into my setup. I'll let you know if I find anything.

Cheers,
Bill
Coordinator
Apr 4, 2014 at 3:36 PM
None of the projects have been tried with VS2013. I only have it on one of my machines as 8.1 has been an ornery mule for compatibility on my dev desktops and laptops.

On Android, I have had the tests on a variety of devices, Samsung Play, Nexus 7, Galaxy nexus, Iconia A5. On WP8, both Nokia 8xx and 9xx phones. I do not have a 1020, but I would imagine it working like a 9xx. THe 9xx behaves differently than the 8xx, so maybe I am incorrect in my assumption.

I have also updated the WinRT build and verified it working on our surface RT. I have Surface Pro and an HP Omni 10, but don't know how to get stuff on the Omni 10.

What specific problems have you had?
Apr 9, 2014 at 1:06 PM
Sorry for the delay, here's some more specifics on a WP8 test run:

Setup:
  • Visual Studio Ultimate Update 1
  • Cocos2d-XNA setup as per instructions on github
  • Solution file: cocos2d-xna\tests\cocos2d-xna.Tests.WindowsPhone.sln
  • Debug on Nokia 1020
Results:
  • An exception is thrown in Effect.ReadParameters in the handling of the "default:" case of the switch:
default:
    throw new NotSupportedException();
The switch is on the EffectParameterType that is trying to be read in. The type that is not handled, and hence causing the exception to be thrown, is Texture2D.

I'll keep poking around to see if I find anything in my setup as the root cause.
Coordinator
Apr 9, 2014 at 4:18 PM
That was an old bug in MonoGame.

Make sure that your submodule is pointing at develop.

You can git bash on cocos2d-xna, cd into MonoGame, and then do "git checkout develop" which will put you on the correct branch.
Apr 10, 2014 at 11:50 AM
Sweetness!

That works - thanks totallyevil.
May 2, 2014 at 6:47 PM
Followed the same bug to this thread, cannot build tests after "git checkout develop". MonoGame.Framework.WindowsGL fails to load as a project. What am I missing?
Coordinator
May 2, 2014 at 9:39 PM
Change the build target platform maybe? Sometimes it has a platform target that is not compatible, e.g. x86 and not AnyCPU.
May 3, 2014 at 1:44 AM
totallyevil, is there anything that needs to be done after "git checkout develop" is run? I've tried to re-setup MonoGame per documentation but the error still persists, either that or it reverts back to old version somewhere.

I've only basic knowledge of git.
Coordinator
May 5, 2014 at 4:44 AM
"git checkout" only sets your local branch identifier to the "develop" GUID. You need to run "git pull" to pull down the actual files on that branch.