hockeyapp throws exception on UWP in xamarin.forms application

我们两清 提交于 2019-12-12 04:35:58

问题


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

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:


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.

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



来源:https://stackoverflow.com/questions/41462048/hockeyapp-throws-exception-on-uwp-in-xamarin-forms-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!