Installing CocosSharp.Forms via NuGet leads to Build Errors

ThomasEveringhamThomasEveringham USMember ✭✭
edited June 2017 in Xamarin.Forms

Hi everyone, I just created an empty Xamarin.Forms project (shared code) in Visual Studio 2017. The project built and ran fine (debug x86, UWP, local machine).

I then added the CocosSharp.Forms and CocosSharp NuGet packages for Android, iOS, and UWP.

Now the project does not build (same configuration), with errors:

  • Type universe cannot resolve assembly: Xamarin.Forms.Platform.WinRT, Version=, Culture=neutral, PublicKeyToken=null
  • Cannot resolve Assembly or Windows Metadata file 'Xamarin.Forms.Platform.WinRT.dll'

I'm not sure how to interpret this. Does CocosSharp.Forms not support UWP?


CocosSharp.Forms Android, iOS, UWP v 1.7.1
CocosSharp Android, iOS, UWP v 1.7.1
Xamarin.Forms Android, iOS, UWP v


  • AhmedElashkerAhmedElashker USMember ✭✭

    I'm having similar issues with CocosSharp on Xamarin Forms.

    First of all it doesn't show properly on Xaml preview and every time I have to edit anything in the page UI I have to comment the line where I add the CocosSharp view first so the preview can show.

    Another problem is a null pointer exception happens with the following scenario.

    • Page is created.
    • Some UI modifications are made (page being rotated)
    • Then adding the CocosSharp view

    To avoid the crash I have to add the CocosSharp view right after InitializeComponent(); . If I moved that bit any further down the application will crash without a clear indication that this is the real cause. It already stole a half day's work for me to fix.

  • ArlecchinoArlecchino USMember ✭✭

    Official CocosSharp does not support UWP!
    There is an unofficial repo from @Andy9FromSpace
    But the part for CocosSharp.Forms for UWP is still missing I think.

  • Andy9FromSpaceAndy9FromSpace CHMember ✭✭

    Just to clear something up. All my relevant changes about UWP got merged with the main repository (branch develop So you can also just use that repository. And if ever someone decides to do some work for CocosSharp, you probably will find those updates in that repository and branch.

Sign In or Register to comment.