WindowsPhone 8.1 app crashes when using game logic in PCL

Hi!
I have project with all game logic defined in PCL (using latest CC# - 1.5.0.1).
When I create a WP81 project and reference the PCL project, application crashes on launch with following error:

System.IO.FileLoadException: Could not load file or assembly 'MonoGame.Framework, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at LuauBoardGame.Common.BaseScene.<.ctor>b__0_0(Single dt) at CocosSharp.CCTimer.Update(Single dt) at CocosSharp.CCScheduler.Update(Single dt) at CocosSharp.CCApplication.Update(GameTime gameTime) at Microsoft

Please advise.

Posts

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    I just uninstalled my templates and installed the 1.5.0.1 templates. Created a CocosSharp -> Mobile -> Portable project, compiled and ran the Windows Phone8.1 project. Could you please retry or send us the project to see what is going on.

  • AlexSAlexS USUniversity ✭✭✭

    Unfortunately, it is still the same for me.
    Exception thrown: 'System.IO.FileLoadException' in CocosSharp.ni.DLL

    Additional information: Could not load file or assembly 'MonoGame.Framework, Version=3.1.2.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    Alex could you send me your project please.

  • AlexSAlexS USUniversity ✭✭✭

    Sure, will send you in a private message.
    I found why it's crashing. When I'm trying to use Schedule method inside CCScene, it tries to load monogame framework :)
    I commented it out and game now runs completely from PCL source on WP8.1 even with system fonts. Cool.
    But still darn slow.

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    That was code from a Scene? Do no try to do anything with a Scene but within the Layer added to the Scene. We should still not get an error but more of an Assert instead. At least a CCLog and graceful exit. I think the error is also misleading because it is coming from a PCL.

    Set up an issue here

Sign In or Register to comment.