Bug 21508 - Run With results in: "Execution failed: Object reference not set to an instance of an object."
Summary: Run With results in: "Execution failed: Object reference not set to an instan...
Status: RESOLVED DUPLICATE of bug 21205
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in ()
Version: unspecified
Hardware: PC Windows
: Normal normal
Target Milestone: 5.3
Assignee: Greg Munn
Depends on:
Reported: 2014-07-22 09:04 UTC by dandrews@nerdery.com
Modified: 2014-08-15 12:45 UTC (History)
4 users (show)

Is this bug a regression?: ---
Last known good build:

Xamarin IDE log with the NPE (58.34 KB, application/octet-stream)
2014-07-22 11:00 UTC, dandrews@nerdery.com
associated androidtools log (2.27 KB, application/octet-stream)
2014-07-22 11:01 UTC, dandrews@nerdery.com

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description dandrews@nerdery.com 2014-07-22 09:04:13 UTC
When I click "run with" and choose my android phone to push my project to, I get the error "Execution failed: Object reference not set to an instance of an object." There was no obvious way to get more information. Please let me know if I can dig up a log file somewhere for you.

I am able to run the project using Xamarin from VS, however.
Comment 1 Prashant manu 2014-07-22 10:55:30 UTC
We have checked and not getting this error.

Please add the logs from the following places?:
On XS IDE Log  Location: XS>Help> Open Log Directory> IDE.log file (with latest
AndroidTools log: XS->Help->Open Log Directory->AndroidTools.log

Also please let us know problem exist with specific project or with all android projects.

Environment Info:
XS 5.1.4(build 0)
Comment 2 dandrews@nerdery.com 2014-07-22 11:00:45 UTC
Created attachment 7443 [details]
Xamarin IDE log with the NPE
Comment 3 dandrews@nerdery.com 2014-07-22 11:01:37 UTC
Created attachment 7444 [details]
associated androidtools log
Comment 4 dandrews@nerdery.com 2014-07-22 11:05:20 UTC
I quickly tested just creating an Android app within Xamarin studio and it built and pushed to my phone just fine. The project that I am trying to build for my company has a portable project, an android project, and an iOS project. I right click on the android project and try to run it on my phone, this is when I get the failure. I only possess a license for Android development, the iOS project is grayed out. I should also mention, I am able to push this project from Visual Studio with the Xamarin integration, but only over TCP/IP. That may be unrelated but I thought I should mention it. Let me know if there is anything else I can do to try to reproduce this or give you more information.
Comment 5 Greg Munn 2014-07-30 10:39:26 UTC
This sounds like a duplicate of bug 21205. 

dandrews@nerdery.com, what is the start up item for the solution? Is it, by any chance, the iOS project? If it is then try changing the start up to be the android project and try again. This specific case should be resolved in 5.3.

*** This bug has been marked as a duplicate of bug 21205 ***
Comment 6 dandrews@nerdery.com 2014-07-30 10:46:02 UTC
Hi Greg, I checked the solution settings and no startup project was selected. the iOS project is grayed out because I do not possess a license for iOS development. When I selected the Android project as the startup project, it works, no crash. Thanks!
Comment 7 Greg Munn 2014-07-30 11:08:28 UTC
Ah, yes. When the iOS project is set as the start up, and you don't have iOS installed, then XS doesn't show that there is any start up project. 

If, for example, there had been no start up project set, then XS would have chosen the Android project as the start up for you.
Comment 8 Thomas 2014-08-15 12:45:51 UTC
I ran into this as well. What about a simple message saying "Please select a startup project"?