Struggles with sample project - GoneBananas

I downloaded the the sample project "GoneBananas". The project builds fine, but when I run it on a device or a simulator, it crashes with the following:

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object

On:
var application = new CCApplication ();

Posts

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    What platform are you having problem with?

  • I'm developing in Visual Studio 2013 for iOS

  • kjpou1kjpou1 LUMember, Xamarin Team Xamurai

    Clayton

    I have it running on both iOS mac and iOS from VS2013. One thing I did have to change in the VS version was the deployment target which was set at 8. I only have 7.1 here.

  • Yes I also had to change that. I spent all day messing with things to try get it running, but had no luck. If anyone has any advice it would be most appreciated.

  • I made some progress. I downloaded a fresh copy of the source and tried again. I still cannot run it via the iPhone simulator, but now it's working on my device. I get an error about it not generating an exe file, but after clicking OK it runs fine.

    My next problem is, I tried to create the project as in the walk through. What type of project is the the GoneBananasShared project. The icon shows the Xamarin logo. I have read and gone through multiple tutorials on youtube and pluralsight. They only mention using a PCL, but when I add one it appears like a normal project, not like the one in the sample project.

  • crpietschmanncrpietschmann USMember
    edited August 2014

    The GoneBananasShared project is a "Shared Project" type. This is a different project type that the PCL. Basically a Shared Project doesn't have it's own assembly references, but rather gets compiled with and inherits the assembly references of the project it that references it and is compile with. It allows you to share multiple code files between projects in a similar way as the old shared file feature (via "add as link" option) but it includes a bunch of files to share between multiple projects.

Sign In or Register to comment.