Forum Libraries, Components, and Plugins

How to solve crash on template project on WP8.1, fail to initialize CocosSharp:CCGameView

Hello
I just start with CocosSharp, and try to deploy template project to my WP8.1 device (Lumia 1020). And it breaks on MainPage constructor - method InitializeComponent().

There is exception text:
"An exception of type 'Windows.UI.Xaml.Markup.XamlParseException' occurred in CocosSharpGame1.WP81.ni.EXE but was not handled in user code

WinRT information: Cannot create instance of type '%0' [Line: 14 Position: 50]

Additional information: The text associated with this error code could not be found.

Cannot create instance of type '%0' [Line: 14 Position: 50]

If there is a handler for this exception, the program may be safely continued."

So I try initialize CCGameView in OnNavigateTo method, and add it to Grid in code. It's crash on constructor too, with this error msg:
"Could not find a graphics device that supports the HiDef profile"

StackTrace:
at Microsoft.Xna.Framework.Graphics.GraphicsDevice.set_GraphicsProfile(GraphicsProfile value)
at Microsoft.Xna.Framework.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, GraphicsProfile graphicsProfile, PresentationParameters presentationParameters)
at CocosSharp.CCGameView.InitialiseGraphicsDevice()
at CocosSharp.CCGameView.Initialise()
at CocosSharp.CCGameView..ctor()\
at CocosSharpGame1.WP81.MainPage.OnNavigatedTo(NavigationEventArgs e)

Could someone please help me, how to fix that?

Answers

  • Drung007Drung007 CZMember

    OK. My last idea solved that problem:
    Problem is, that my new install of VS2015 and Cocossharp examples (even Win 10 was installed 2 days before) contains old version of CocosSharp - 1.7.0 - pre1
    After update that little changed project to 1.7.1 was appeard some new problem, so I try this:
    Create new templeta project (Shared), first update to 1.7.1 using NuGet, and it works!!!

Sign In or Register to comment.