You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to generate an msix with a manifest that uses a unique set of values for the Windows.Desktop TargetDeviceFamily, something that looks like this:
The value for the MinVersion attribute can be customized by setting the "TargetPlatformMinVersion" property in my project file, though it can't be higher than MaxVersionTested.
The MaxVersionTested tested value comes from the "TargetPlatformVersion" property, which is determined in the .NET SDK by calling [MSBuild]::GetTargetPlatformVersion on the TargetFramework (see here). Note that if you try setting the "TargetPlatformVersion" property directly in the project file it will be overwritten.
The TargetFramework by default is set to something like "net6.0-windows10.0.19041.0", so that call evaluates to 10.0.19041.0. But it's not possible to put a custom value here, as it has to match one of the hard-coded "WindowsSdkSupportedTargetPlatformVersion" items from the .NET SDK, that correspond to the released versions of the Windows SDK (10.0.22621, 22000, 20348, 19041, etc.).
The result of all this is that there's no possible way for me to end up with a manifest that has a value higher than 10.0.22621 for the MaxVersionTested attribute of my TargetDeviceFamily.
Steps to reproduce the bug
Try to overwrite the MaxVersionTested value in the TargetDeviceFamily element of the generated AppxManifest.xml file.
Expected behavior
Value is set to something other than the version pulled from the TargetFramework value.
Screenshots
No response
NuGet package version
Windows App SDK 1.5.0: 1.5.240227000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview
Additional context
No response
The text was updated successfully, but these errors were encountered:
This seems to happen with the WinUI templates which come with the packaging as part of the project. The templates with the separate packaging project doesn't touch that setting.
This seems to happen with the WinUI templates which come with the packaging as part of the project. The templates with the separate packaging project doesn't touch that setting.
@DarranRowe Thanks for mentioning that. If you're creating the package using a Windows Packaging project (.wapproj) then you can change these values by changing the TargetPlatformVersion and TargetPlatformMinVersion properties in the wapproj file. My repro steps are specifically for the scenario where you have just a single WinUI project that contains the AppxManifest.
Describe the bug
I'm trying to generate an msix with a manifest that uses a unique set of values for the Windows.Desktop TargetDeviceFamily, something that looks like this:
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.26031.0" MaxVersionTested="10.0.26031.0" />
Right now, the default values of a newly created project targeting 1.4 or 1.5 will be the following:
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
Here's how these values are determined:
The result of all this is that there's no possible way for me to end up with a manifest that has a value higher than 10.0.22621 for the MaxVersionTested attribute of my TargetDeviceFamily.
Steps to reproduce the bug
Try to overwrite the MaxVersionTested value in the TargetDeviceFamily element of the generated AppxManifest.xml file.
Expected behavior
Value is set to something other than the version pulled from the TargetFramework value.
Screenshots
No response
NuGet package version
Windows App SDK 1.5.0: 1.5.240227000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview
Additional context
No response
The text was updated successfully, but these errors were encountered: