hockeyapp throws exception on UWP in xamarin.forms application

340 views Asked by At

I was using hockeyapp successfully in android and ios when I now try to use it uwp application on emulator and local win10 machine. It throws as exception for missing " 'Windows.System.Profile.HardwareIdentification'.":"Windows.System.Profile.HardwareIdentification""

my UWP version is as below

enter image description here

my application is an xamarin.forms application. here is what I installed

  • XF proj: HockeySDK.Xamarin, HockeySDK.Core
  • UWP proj: HockeySDK.Core, HockeySDK.UWP

In the constructor of MainPage.xaml.cs in UWP project I have added

 Microsoft.HockeyApp.HockeyClient.Current.Configure(HockeyAppID);

in XF project within try catch functions I fire TrackException as below

catch (Exception ex)
                {
                Dictionary<string, string> properties = new Dictionary<string, string>();
                properties.Add(key, value);
                Microsoft.HockeyApp.HockeyClient.Current.TrackException(ex, properties);
                }

when I search for it, I only find posts like this one which shows how to get HardwareIdentification but I thought hockeyapp should fetch it for me and it does on android. what is wrong with UWP? Do I have to do it myself if yes where should I pass this information? Or could be that something is wrong with my win10 installation :)

1

There are 1 answers

0
Emil On BEST ANSWER

I finally found an answer to my question. although my uwp was cofigured with min and max version as in the image and I had sdk 14393 was installed. enter image description here

obviously it is not enough. if you dont have SDK. Released November 2015. (Version 10.0.10586.212), there will be no file generated for Windows.System.Profile.ProfileHardwareTokenContract.winmd as shown in the image below. once I installed this sdk as well, file was successfully created.

This file looks like necessary using hockeyapp, xamarin insight, application insight etc. because they need to identify the device. It is also necessary later when you want to ship your app to the windows store. I hope that this helps some people

enter image description here