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

maxVersionTested triggers build warning #1781

Closed
sylveon opened this issue Jul 8, 2019 — with docs.microsoft.com · 17 comments
Closed

maxVersionTested triggers build warning #1781

sylveon opened this issue Jul 8, 2019 — with docs.microsoft.com · 17 comments

Comments

Copy link
Contributor

sylveon commented Jul 8, 2019

In VS 2019, when I add maxVersionTested to my manifest like instructed in this page, I get the following warning:

1>resources\app.manifest : manifest authoring warning 81010002: Unrecognized Element "maxVersionTested" in namespace "urn:schemas-microsoft-com:compatibility.v1".

I'd like to not have to silence this warning because it can be useful to correct mistakes - is there any way to fix this?


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@mcleanbyron
Copy link
Contributor

I'm sorry you're encountering this issue. I tested this out in Visual Studio 2019 version 16.1.3 with version 10.0.18362.1 of the Windows SDK and am not seeing this warning after adding the maxversiontested element to app manifest files in new WPF and Windows Forms projects. Can you clarify which versions of the tools you have installed and whether you're seeing this warning in new projects?

@sylveon
Copy link
Contributor Author

sylveon commented Jul 8, 2019

Brand new C++ project using the Windows SDK 18362 on Visual Studio 2019 16.2 Preview 3.

I added the following manifest, copied verbatim from the docs:

<?xml version="1.0" encoding="UTF-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
            <!-- Windows 10 -->
            <maxversiontested Id="10.0.18362.0"/>
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
        </application>
    </compatibility>
</assembly>

and got the following output when building

1>------ Build started: Project: ConsoleApplication2, Configuration: Debug Win32 ------
1>ConsoleApplication2.cpp
1>
1>app.manifest : manifest authoring warning 81010002: Unrecognized Element "maxversiontested" in namespace "urn:schemas-microsoft-com:compatibility.v1".
1>ConsoleApplication2.vcxproj -> C:\Users\Sylveon\source\repos\ConsoleApplication2\Debug\ConsoleApplication2.exe
1>Done building project "ConsoleApplication2.vcxproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

@mcleanbyron
Copy link
Contributor

Thanks for the additional details. The engineering team has confirmed that this is a known minor issue. Given that it is just a warning that can be ignored, they have no plans on fixing this issue at this time. I will add a note about this to the article you referenced.

@mcleanbyron
Copy link
Contributor

The article has been updated with the note. Thanks again for your feedback!

@sylveon
Copy link
Contributor Author

sylveon commented Jul 14, 2019

Actually, this is breaking. maxVersionTested is completely ignored by WindowsXamlSource but maxversiontested is not, even though the guide instructs to use the camel cased name.

@mcleanbyron
Copy link
Contributor

Thanks for catching that. The examples did specify 'maxversiontested' without camel casing but the surrounding steps/instructions showed it camel cased. I updated the text so it is shown consistently without camel casing everywhere.

@EatonZ
Copy link

EatonZ commented Aug 13, 2019

Hi, may be slightly off topic, but what exactly is the benefit of setting maxversiontested in a manifest?
The documentation doesn't really state why it may be beneficial. If I were to set it in say, a WinForms app, what would happen exactly? I already use supportedOS.

@sylveon
Copy link
Contributor Author

sylveon commented Aug 13, 2019 via email

@osolo
Copy link

osolo commented Nov 29, 2019

@mcleanbyron Is there any way to suppress these warnings?

@sylveon
Copy link
Contributor Author

sylveon commented Nov 29, 2019

Using the ""correct"" version, maxversiontested, does not emits warnings anymore for me.

@osolo
Copy link

osolo commented Nov 30, 2019

What is the "correct" version? I have the following, using the release SDK version, and I still get a warning:

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <maxversiontested Id="10.0.18362.0"/>
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
    </application>
  </compatibility>
</assembly>

@sylveon
Copy link
Contributor Author

sylveon commented Nov 30, 2019

Oh yeah my bad I actually just removed maxversiontested from my manifest because I use the MSIX packaging format now.

@ChrisGuzak
Copy link
Contributor

ChrisGuzak commented Jun 15, 2021

This is a bug in mt.exe and has been fixed in SDKs 19508 and above (unreleased at this date). @GovM-MSFT FYI.

@GovM-MSFT
Copy link

GovM-MSFT commented Jun 15, 2021 via email

QuinnRadich pushed a commit that referenced this issue Aug 18, 2021
…-glyph-table-update

Update images and descriptions for Segoe MDL 2 glyphs
@alecazam
Copy link

alecazam commented Oct 4, 2023

This part of the AppManifest is really unclear. The docs state that you can set the minimum and maximum OS. But supportedOS seems to be Win10, and not the 20 versions of it. So is that my minimum OS? But I want build 1903 to be the minimum. I fail to see how maxversiontested is even useful, unless say Win11/12 want's to set some Win10 compatability checkbox. And maxversiontested won't be honored until build 1903.

MSIX has a MinVersion and a MaxVersionTested which make so much more sense. And they don't pull in bizzare GUIDs for the supportedOS. You just specify the min/max. But we're using Steam to install, so there is no MSIX installer. So I assume we're stuck with just killing the app if we detect an older variant in the last 10 years of Win10 that we don't want.

<Dependencies>
    <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.21301.0" />
</Dependencies>

@sylveon
Copy link
Contributor Author

sylveon commented Oct 5, 2023

maxversiontested doesn't do what you want anyways. It won't make the OS prevent your app to run on lower versions. It's merely to signal to XAML islands what compatibility level to use.

Neither does supportedOS btw - an app with the Windows 10 supportedOS GUID will still launch on Windows 7.

@alecazam
Copy link

alecazam commented Oct 5, 2023

Steam is sunsetting Win7/8/8.1. And when Win10 32-bit OS, it will be a good thing, even though we don't support it. So we just reject any Windows version before build 1903 explicitly in the code now. I'd just hoped there was a way to say for a Win32 app to specify the minspec x and maxspec x+2 in the app manifest. We do this on iOS/macOS very easily, and it also transfers to the App Store.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants