Winui3: WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later.

21939029 936 Reputation points


I came across this concept where we can host XAML contents on the Win32 window's HWND, by which we can use both WinRT with Win32 [Ref- ]

I followed the instruction from the above link, but I was getting the following error:

'WindowsXamlManager and DesktopWindowXamlSource are supported for apps targeting Windows version 10.0.18226.0 and later.  Please check either the application manifest or package manifest and ensure the MaxTestedVersion property is updated.'.  

I found the solution for this [Ref -] and I was able to fix this by the first method provided in that link[ With MSIX packaging]. Here we had to package the application as MSIX and use, it as the target SDK.

But I wanted to solve it with the second method[With app.manifest]. i followed the steps and created app.manifest file. but i was stuck here in

 "We can do this through the visual editor. Right click on the project and choose Properties, then in the Resources section type app.manifest in the Manifest field, as highlighted below:"  

I'm using visual studio 2022, version 17.4. I was not able to get the following options.

It would be of great help if you could help me achieve it

Universal Windows Platform (UWP)
Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
506 questions
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 7,666 Reputation points Microsoft Vendor

    Hi @21939029 ,

    This problem is caused by incorrectly referencing the manifest file in the win32 project, please follow the steps below to add.

    1. Remove the app.manifest file in the document sample in Visual Studio.
    2. Modify app.manifest to <YourAppName>.exe.manifest in your project folder.
    3. Right-click your project in Visual Studio → AddResource..Importselect All file(*) in the file picker→ select <YourAppName>.exe.manifest → enter the resource type as RT_MANIFEST.
    4. Build and run.

    Thank you,

0 additional answers

Sort by: Most helpful