0

I'm trying to implement the code in the question: Desktop Shortcut in Desktop Bridge App. Where do we get the AppUserModelId

I want to get the Aumid for my app by given code in the IAPWrapper based DLL project in Visual Studio 2015:

string aumid = (await Package.Current.GetAppListEntriesAsync()).First().AppUserModelId;

But I get the build error that "'AppListEntry' does not contain a definition for 'AppUserModelId' and no extension method 'AppUserModelId'". How do I update my UWP libraries for Visual Studio 2015 in order to solve this problem?

user173399
  • 464
  • 5
  • 21
  • The `AppUserModelId` property was added in version 16299 of the SDK and requires Windows 10 version 1709 or later. The SDK can be downloaded from [here](https://developer.microsoft.com/sv-se/windows/downloads/sdk-archive?WT.mc_id=WD-MVP-5001077) – mm8 Jan 31 '22 at 20:59

2 Answers2

1

The AppUserModelId property was added in version 16299 of the SDK.

It requires Windows 10 version 1709 or later and is only officially supported on Visual Studio 2017 and later so you should upgrade.

mm8
  • 163,881
  • 10
  • 57
  • 88
  • I updated to VS 2022 and it recommended to upgrade my project to use .NET framework 4.8. I did that but the same error message is still there. Why it is not getting the new definition as pointed out in the original question? – user173399 Feb 01 '22 at 07:58
  • What's the `TargetPlatformVersion` in your packaging project? – mm8 Feb 02 '22 at 20:54
  • Thanks for following up. The problem was with references, I removed and added them again and it worked. – user173399 Feb 03 '22 at 10:28
0

It's not possible according to various articles that I found.

How to install (v142) Build tools in Visual studio

Each visual studio edition has a limit on the last toolset that it can use. I will need to upgrade to a later Visual Studio.

user173399
  • 464
  • 5
  • 21