Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maxversiontested to Xaml Islands can be used in a VSTest project #4887

Closed
ChrisGuzak opened this issue Feb 7, 2024 · 0 comments · Fixed by #4888
Closed

Update maxversiontested to Xaml Islands can be used in a VSTest project #4887

ChrisGuzak opened this issue Feb 7, 2024 · 0 comments · Fixed by #4888

Comments

@ChrisGuzak
Copy link
Member

ChrisGuzak commented Feb 7, 2024

Description

The Windows API DesktopWindowXamlSource requires the process to identify the version of the operating system it was tested on by specifying this in it manifest via maxversiontested (dot net had the same problem). Since tests run under testhost.exe, it must specify this to enable tests that use that XAML API to function.

    if (CQuirksMode2::QuirkBlockXamlIslands())
    {
        // Xaml Islands are available from 19H1( 10.0.18226.0 ) release onwards.
        ::RoOriginateError(E_UNEXPECTED,

Steps to reproduce

Create a test that ties to construct DesktopWindowXamlSource.

Expected behavior

The test can run.

Actual behavior

the test fails due to a fail fast in Xaml

Diagnostic logs

I've got stack traces and source for those interesetd.

Environment

Windows 10 or above.

Here is an example manifest that is suppoorted.

<?xml version='1.0' encoding='utf-8' standalone='yes'?>
<assembly
  manifestVersion='1.0'
  xmlns:asmv3='urn:schemas-microsoft-com:asm.v3'
  xmlns='urn:schemas-microsoft-com:asm.v1'>
    <compatibility xmlns='urn:schemas-microsoft-com:compatibility.v1'>
        <application>
            <maxversiontested Id='10.0.18362.0'/>
            <maxversiontested Id='10.0.19041.0'/>
            <maxversiontested Id='10.0.22000.0'/>
            <supportedOS Id='{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}' />
        </application>
    </compatibility>
    <application xmlns='urn:schemas-microsoft-com:asm.v3'>
        <windowsSettings>
            <dpiAware xmlns='http://schemas.microsoft.com/SMI/2005/WindowsSettings'>true/PM</dpiAware>
            <dpiAwareness xmlns='http://schemas.microsoft.com/SMI/2016/WindowsSettings'>PerMonitorV2, PerMonitor</dpiAwareness>
        </windowsSettings>
    </application>
</assembly>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant