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

Incremental build after changing property on command line produces non-runnable app #8529

Closed
srdjanjovcic opened this issue Jun 7, 2023 · 1 comment
Labels
area-Tooling bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team

Comments

@srdjanjovcic
Copy link
Member

Describe the bug

While investigating incremental build issues with MAUI app's WinUI projection, I have discovered that switching from packaged to unpackaged mode when building produces broken app. I have discovered that culprit is that second build, with /p:WindowsPackageType=None retained same resources.pri as packaged build, which breaks the app.

Repro is with a MAUI app, but I didn't test with plain WinUI app, although I expect that it would hit the same issue.

Steps to reproduce the bug

  1. Create a MAUI app
  2. Rebuild it once in packaged mode:
  • msbuild /r /t:Rebuild MauiApp1.csproj
  1. Observe size and content of resources.pri under bin\Debug\net7.0-windows10.0.19041.0\win10-x64\resources.pri.
  • It should be around 140Kb
  1. Run incremental build, forcing unpackaged mode:
  • msbuild /p:WindowsPackageType=None MauiApp1.csproj
  1. Try launching bin\Debug\net7.0-windows10.0.19041.0\win10-x64\MauiApp1.exe
  • App crashes.
  1. Observe size and content of resources.pri under bin\Debug\net7.0-windows10.0.19041.0\win10-x64\resources.pri.
  • It is still 140Kb, while it should be over 1Mb

WORKAROUND:

  1. Delete \obj\Debug\net7.0-windows10.0.19041.0\win10-x64\priconfig.xml
  2. Do incremental build:
  • msbuild /p:WindowsPackageType=None MauiApp1.csproj
  1. Observe size and content of resources.pri under bin\Debug\net7.0-windows10.0.19041.0\win10-x64\resources.pri.
  • Now it is expected 1Mb+ in size.
  1. Try launching bin\Debug\net7.0-windows10.0.19041.0\win10-x64\MauiApp1.exe
  • App launches successfully.

Expected behavior

  1. Launching MauiApp1.exe should succeed after switching mode incrementally.

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

@srdjanjovcic srdjanjovcic added the bug Something isn't working label Jun 7, 2023
@evelynwu-msft evelynwu-msft added area-Tooling team-Markup Issue for the Markup team product-winui3 WinUI 3 issues labels Jun 7, 2023
@bpulliam
Copy link
Contributor

bpulliam commented Jun 8, 2023

While I agree this would be nice, there is an obvious workaround to do a clean build when changing the package type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tooling bug Something isn't working product-winui3 WinUI 3 issues team-Markup Issue for the Markup team
Projects
None yet
Development

No branches or pull requests

3 participants