msix-packaging: [BUG] Build fails trying to create .msixbundle for a .NET 7.0 desktop app

Project MSIX SDK or Win7Msix

Describe the bug

Cannot create .msixbundle for .NET 7.0 desktop app.

To Reproduce Steps to reproduce the behavior:

  1. load the attached solution: WpfApp1.zip
  2. build it
  3. right click WapProjTemplate1 -> Publish -> Create app packages

Notice that the build for "Configuration: Debug Any CPUis attempting to build with/platform:x86 ` and so the packaging fails with "1>There was a mismatch between the processor architecture of the project being built “MSIL”…

This does not happen when using .NET 4.8. In this case the build does build

Expected behavior

It should “just work”.

Screenshots

Platform

Windows 11, VS 2022, .NET 7.0

Additional context

I isolated this from the real app that I’m building where you can see the MyMoneyPackage project working on .NET 4.8:

In the master branch. If you checkout the “net7” branch then you will see this error.

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

I really don’t understand this. Why does it have to assume self-contained, when it can work as a framework-dependent app? Can this option be added?