microsoft / microsoft/msix-packaging

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

Open
#557 15 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-External Area-MSIX
Dominant language
C
Stars
1.1k
Forks
193
Avg merge
2h 16m
Merged PRs (30d)
2

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached WpfApp1.zip and reproduce the failure by building WapProjTemplate1 through Publish → Create app packages on Windows 11 with VS 2022 and .NET 7. Compare the .NET 7 behavior with the working .NET 4.8 case in MyMoney.Net, including its net7 branch. Done means the .msixbundle builds without the MSIL/x86 architecture mismatch.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, desktop, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.