0

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 :)

Community
  • 1
  • 1
Emil
  • 6,411
  • 7
  • 62
  • 112
  • Tried a demo and put your `catch` code in the UWP project, I cannot reproduce your issue, are you catch the exception in PCL? – Grace Feng Jan 05 '17 at 09:36
  • 1
    @GraceFeng-MSFT yes in PCL. I actually found out that my project works on another computer. In the computer where it throws this exception Windows.System.Profile.ProfileHardwareTokenContract.winmd doesnot exist in the location C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.ProfileHardwareTokenContract\1.0.0.0\. I dont know how that happened, I am not sure if that is something to do with the VS2017RC installation. other week I have installed and uninstalled it. then problems started. Do you know how to restore it without full VS installation? – Emil Jan 05 '17 at 11:22
  • did you tried to repair VS under `Programs and Features`? If it doesn't work, I can only suggest you to reset your pc and reinstall VS...I know it troubles, but normally VS cannot be uninstalled clear from pc, it could be the problem here, as you said you installed and uninstalled VS. – Grace Feng Jan 06 '17 at 01:25
  • @GraceFeng-MSFT I believe this has nothing to do with the VS. I have upgraded my Win10 to anniversary update but even after update, problem persists. Windows.System.Profile.ProfileHardwareTokenContract.winmd is missing on the path C:\Program Files (x86)\Windows Kits\10\References\Windows.System.Profile.ProfileHardwareTokenContract\1.0.0.0. I cant find any information how to restore or fix this without fresh windows 10 installatio? Do you have any idea please? – Emil Feb 12 '17 at 14:39

1 Answers1

0

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

Emil
  • 6,411
  • 7
  • 62
  • 112