microsoft / msix-packaging

MSIX SDK
MIT License
963 stars 163 forks source link

[BUG] Error when trying to package project with multiple TargetFrameworks #635

Open DmitryBorodiy opened 1 week ago

DmitryBorodiy commented 1 week ago

Project MSIX SDK

Describe the bug Hello, community! I have sample Avalonia application project with multiple target frameworks monikers.

<PropertyGroup>
  <OutputType>WinExe</OutputType>
  <TargetFrameworks>net8.0-windows10.0.19041.0;net8.0</TargetFrameworks>
  <ApplicationManifest>app.manifest</ApplicationManifest>
  <Nullable>disable</Nullable>
  <PlatformTargets>x86</PlatformTargets>
  <Platforms>x64;x86;</Platforms>
</PropertyGroup>

Expected behavior The MSIX packaging project must support multiple target frameworks or prefer net8.0-windows target framework monikers.

Screenshots image

Platform .NET/Avalonia, Windows 11 build 22635

DmitryBorodiy commented 1 week ago

Maybe anyone knows how to fix this?

LuKePicci commented 2 days ago

We use a separate git branch for MSIX packaging in which TargetFrameworks is replaced by single TargetFramework in order for the build to succeed in the CI pipeline. Would be also great to fix this in VS by eventually respecting the target framework selected in the Debug dropdown.