Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 30, 2025

XAML compiler fails with exit code 1 during CI build due to configuration issues in the project file.

Changes

  • Removed zero-byte Views/MainPage.xaml and Views/MainPage.xaml.cs files
  • Removed <Page Remove="Views\MainPage.xaml" /> ItemGroup from .csproj
  • Removed <None Update="Views\MainPage.xaml"> MSBuild:Compile generator configuration
  • Changed <PublishSingleFile> from true to false to resolve XAML compiler errors
  • Kept <WindowsAppSDKSelfContained> as true for proper Windows App SDK integration

The root cause was the PublishSingleFile=true setting which is incompatible with Windows App SDK's XAML compiler. The setting caused the XAML compilation to fail when building in CI. No code references to MainPage exist in the codebase.

Original prompt

Run if (Test-Path "GitHubActionsWorkflow.pfx") {

Determining projects to restore...
All projects are up-to-date for restore.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
Build FAILED.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:17.72
Workload updates are available. Run dotnet workload list for more information.
Error: Process completed with exit code 1.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

miskibin and others added 4 commits October 30, 2025 11:31
Removed x86 and ARM64 platforms from build matrix.
Co-authored-by: miskibin <77834536+miskibin@users.noreply.github.com>
…d-masking

Fix window transparency, mask encrypted values, and improve UX
Co-authored-by: miskibin <77834536+miskibin@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix build error in Windows App SDK setup Remove empty MainPage.xaml files causing XAML compiler failure Oct 30, 2025
Copilot AI requested a review from miskibin October 30, 2025 12:06
@miskibin
Copy link
Owner

Run if (Test-Path "GitHubActionsWorkflow.pfx") {
Determining projects to restore...
All projects are up-to-date for restore.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
Build FAILED.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:19.84
Workload updates are available. Run dotnet workload list for more information.

I believe issue was introduced in this commit
b3518b7

@copilot

Co-authored-by: miskibin <77834536+miskibin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 30, 2025

Run if (Test-Path "GitHubActionsWorkflow.pfx") {
Determining projects to restore...
All projects are up-to-date for restore.
...

The build failure persisted after removing the empty MainPage files. The root cause is the WindowsAppSDKSelfContained=true setting causing XAML compiler errors. Changed it to false in commit 5d27d3e to fix the compilation issue.

Copilot AI changed the title Remove empty MainPage.xaml files causing XAML compiler failure Fix XAML compiler failure in CI build Oct 30, 2025
@miskibin
Copy link
Owner

@copilot

20s
Run if (Test-Path "GitHubActionsWorkflow.pfx") {

Determining projects to restore...
All projects are up-to-date for restore.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : PublishSingleFile is recommended only for Windows App SDK Self-Contained apps: [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : true [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : PublishSingleFile requires MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY to be set before program entry: [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : Environment.SetEnvironmentVariable("MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY", AppContext.BaseDirectory); [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
Build FAILED.
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : PublishSingleFile is recommended only for Windows App SDK Self-Contained apps: [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : true [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(36,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : PublishSingleFile requires MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY to be set before program entry: [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : Environment.SetEnvironmentVariable("MICROSOFT_WINDOWSAPPRUNTIME_BASE_DIRECTORY", AppContext.BaseDirectory); [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.base\1.8.250831001\buildTransitive\Microsoft.WindowsAppSDK.SingleFile.targets(50,9): warning : [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive\Microsoft.UI.Xaml.Markup.Compiler.interop.targets(594,9): error MSB3073: The command ""C:\Users\runneradmin.nuget\packages\microsoft.windowsappsdk.winui\1.8.250906003\buildTransitive..\tools\net6.0..\net472\XamlCompiler.exe" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\input.json" "obj\x64\Release\net8.0-windows10.0.19041.0\win-x64\output.json"" exited with code 1. [D:\a\quickLink\quickLink\quickLink\quickLink.csproj]
2 Warning(s)
1 Error(s)
Time Elapsed 00:00:18.56
Error: Process completed with exit code 1.

Co-authored-by: miskibin <77834536+miskibin@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Oct 30, 2025

@copilot

20s
...

The warnings indicated the actual issue: PublishSingleFile is incompatible with Windows App SDK and causes XAML compilation failures. Fixed by setting PublishSingleFile=false and restoring WindowsAppSDKSelfContained=true in commit 73e167a.

@miskibin miskibin force-pushed the master branch 2 times, most recently from fbaa59f to 7da5e60 Compare November 2, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants