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

Harshithraj1871 1,496 Reputation points
2022-11-16T10:33:16.707+00:00

Hi,

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-https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/host-standard-control-with-xaml-islands-cpp ]

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 - https://techcommunity.microsoft.com/t5/windows-dev-appconsult/using-xaml-islands-on-windows-10-19h1-fixing-the-quot/ba-p/376330] 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:"  

260879-image.png
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.
728 questions
0 comments No comments
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 15,061 Reputation points Microsoft Vendor
    2022-11-17T08:36:16.84+00:00

    Hi @Harshithraj1871 ,

    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,
    Junjie


0 additional answers

Sort by: Most helpful