Bug 55506 - Xamarin Profiler doesn't start, shows no error message
Summary: Xamarin Profiler doesn't start, shows no error message
Alias: None
Product: Profiler
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Windows
: High normal
Target Milestone: 15.2
Assignee: Rodrigo Moya
Depends on:
Reported: 2017-04-23 18:40 UTC by Daniel Stolt
Modified: 2017-05-03 11:45 UTC (History)
4 users (show)

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

Complete Xamarin log files. (8.36 KB, application/zip)
2017-04-23 18:40 UTC, Daniel Stolt
Complete VS version information (3.27 KB, text/plain)
2017-04-23 18:40 UTC, Daniel Stolt

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 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 Daniel Stolt 2017-04-23 18:40:12 UTC
Created attachment 21720 [details]
Complete Xamarin log files.

Running Visual Studio 2017 Update 1 on Windows 10 Creators Update.

Same problem whether I try to start it from VS2017 or stand-alone.

Profiler log:

XamarinProfiler.Core.Profiler Information: 0 : [2017-04-17 01:35:21.7615] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2017-04-17 01:35:21.7615] # Xamarin Profiler version -
XamarinProfiler.Core.Profiler Information: 0 : [2017-04-17 01:35:21.7615] # * Arch x86_64
XamarinProfiler.Core.Profiler Information: 0 : [2017-04-17 01:35:21.7615] ##########################################

I've tried starting VS2017 as administrator, doesn't help.

My VS2017 is licensed as Enterprise through my MSDN account.

Please find attached a ZIP file containing the complete Xamarin logs folder in AppData\Local, along with my complete VS version information.

Regarding profiler version, the version in the log above says - I'm not sure where I can find a different version?

The profiler does not run long enough to examine its argument list, or anything else on the process, in Task Manager. It shows up for just about 1 second, and then disappears.

There are no instances of the profiler running.

I should perhaps mention that I can also not start the profiler on the Mac. If I try to start it directly from launch pad or from Finder I get the error message:

An error has occurred
The type initializer for 'XamarinProfiler.Core.Platforms.Android.PlatformAndroid' threw an exception.
If I try to start it through Xamarin Studio on the Mac, the menu item is just not there under the Run menu.
Comment 1 Daniel Stolt 2017-04-23 18:40:47 UTC
Created attachment 21721 [details]
Complete VS version information
Comment 2 Rodrigo Moya 2017-04-24 08:26:48 UTC
Ok, on the Mac side, the problem is not having Xamarin.android installed, which we have already fixed in internal builds. For now, if you install Xamarin.Android, the problem should go away.

On Windows, I guess it might be the same problem, so can you check if that's the case? If not, attaching a debugger to XamarinProfiler.exe should give us some information to being diagnosing the problem.
Comment 3 Daniel Stolt 2017-04-24 15:09:32 UTC
Trying to install Xamarin.Android on Windows, but not sure how.

Through the Visual Studio 2017 Installer, the only individual components I can choose that have anything to do with Android are:

Android NDK (a bunch of different versions)
Android SDK Setup (a few different versions)

But these sound more like external dependencies. Are these the way to install Xamarin.Android?
Comment 4 Rodrigo Moya 2017-04-25 12:19:41 UTC
in the VS 2017 Installer, in the *Individual components* “tab” (?), select *[X] Xamarin* in the *Development activities* section

That should install Xamarin.Android
Comment 5 Daniel Stolt 2017-04-25 12:48:26 UTC
I see - in that case, I don't think this is the problem, because that component is already installed.

To proceed then to your next suggestion, i.e. attach a debugger to XamarinProfiler.exe. I'm not sure how to do that, given that the process only exists for about 1 second?
Comment 6 Rodrigo Moya 2017-04-28 11:24:18 UTC
This (https://msdn.microsoft.com/en-us/library/0bxe8ytt.aspx) should work, just run it inside VS and let's see what it shows
Comment 7 Daniel Stolt 2017-04-28 17:51:21 UTC
That did work, and I can now see the unhandled exception in the debugger.

Message: "The type initializer for 'XamarinProfiler.Core.Platforms.Android.PlatformAndroid' threw an exception."

Inner exception message: "This property is not valid when the SDK is not installed"

So it would appear this indeed does have something to do with something Android-related being missing.

But I'm not sure what - I did double-check that the "Xamarin" component under "individual components" is already installed.
Comment 8 Daniel Stolt 2017-04-28 18:22:37 UTC
I added one of the Android SDKs I mentioned in an earlier comment, and now the profiler starts. I am now getting a different error once I start profiling, but I will create a separate issue for that.
Comment 9 Aman Dharwal 2017-05-03 11:45:42 UTC
Verified this on latest build:-
Xamarin (3e2e792)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (448f54f)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (5ac8af1)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

Build Information :-

Screencast link :-