[build] clean up old $(DebugType) MSBuild settings#34216
Merged
Conversation
These likely came over from the migration from xamarin/Xamarin.Forms -> dotnet/maui. `$(DebugType)=full` seems be causing the error at: * #34201 src\Controls\tests\Xaml.UnitTests\Issues\Gh2007.rtxc.xaml(3,9): XamlC warning XC0022: Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information. [D:\a\_work\1\s\src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj] Fatal error. 0xC0000005 at Mono.Cecil.Pdb.ISymUnmanagedWriter2.Close() at Mono.Cecil.Pdb.SymWriter.Close() at Mono.Cecil.Pdb.NativePdbWriter.Write() at Mono.Cecil.ModuleWriter.Write(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleWriter.WriteModule(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(System.IO.Stream, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(Mono.Cecil.WriterParameters) at Mono.Cecil.AssemblyDefinition.Write(Mono.Cecil.WriterParameters) at Microsoft.Maui.Controls.Build.Tasks.XamlCTask.Execute(System.Collections.Generic.IList`1<System.Exception> ByRef) at Microsoft.Maui.Controls.Build.Tasks.XamlTask.Execute() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__25.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__23 ByRef) at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__19.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__18.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__13.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__50.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__43.MoveNext() at Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.Tasks.TaskSchedulerAwaitTaskContinuation+<>c.<Run>b__2_0(System.Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) at System.Threading.Tasks.Task.ExecuteEntry() at Microsoft.Build.BackEnd.RequestBuilder+DedicatedThreadsTaskScheduler.<InjectThread>b__6_0() at System.Threading.Thread+StartHelper.Callback(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.Thread.StartCallback() Build failed with exit code 57005. Check errors above. We shouldn't be using Windows-specific debug settings in a cross-platform project -- the `$(DebugType)` setting is not needed. I went through a couple projects and found old debugging settings that would have been needed in non-SDK-style projects, but are not needed in SDK-style projects. Removing those settings to cleanup the repo.
Contributor
There was a problem hiding this comment.
Pull request overview
Cleans up legacy, Windows-specific MSBuild debug settings in SDK-style test projects so they inherit the repo-wide debug/PDB configuration (avoiding DebugType=full issues in XamlC/PDB writing).
Changes:
- Removed per-project
DebugTypeoverrides (includingfullin Debug) from test projects. - Removed legacy Debug-only property groups that redundantly set
DefineConstants,ErrorReport, and debug symbol settings.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Essentials/test/UnitTests/Essentials.UnitTests.csproj | Removes redundant DebugType=portable so the project inherits repo defaults. |
| src/Controls/tests/Xaml.UnitTests/Controls.Xaml.UnitTests.csproj | Removes Debug-only group that forced DebugType=full and other legacy settings. |
| src/Controls/tests/SourceGen.UnitTests/SourceGen.UnitTests.csproj | Removes Debug-only group with legacy debug settings, letting SDK/repo defaults apply. |
rolfbjarne
approved these changes
Feb 24, 2026
PureWeen
approved these changes
Feb 24, 2026
This was referenced Feb 25, 2026
jfversluis
added a commit
that referenced
this pull request
Feb 26, 2026
…ss handling
Three fixes for the dogfooding infrastructure:
1. **Workflow trigger**: Reverted dogfood-comment.yml from check_run to
pull_request_target trigger. Azure DevOps check runs never populate the
pull_requests[] array, so the check_run-based condition was always false
and the workflow never ran.
2. **AzDO direct fallback**: Added Azure DevOps API as a fallback when
GitHub Checks API doesn't return build info. Queries
refs/pull/{PR}/merge branch directly to find completed builds.
3. **In-progress build detection**: Added detection for builds that are
currently running. Shows a clear message telling users to wait instead
of a generic 'no build found' error. Also warns when a newer build is
in progress but older artifacts are available.
Additional improvements:
- Build ID validation (numeric check) to prevent URL injection
- PR number validation in bash script
- Protection against set -e crashes on invalid jq input
- Better error messages for all failure scenarios
Tested locally with multiple real PRs (#34216, #34250, #99999999) across
both scripts, verifying: successful builds, in-progress builds, error
handling, and input validation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jfversluis
added a commit
that referenced
this pull request
Feb 26, 2026
…ss handling (#34259) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description Three fixes for the dogfooding infrastructure that was merged in #33198 but never worked correctly: ### 1. Workflow trigger fix (`dogfood-comment.yml`) The workflow was changed from `pull_request_target` to `check_run` trigger in #33198, but Azure DevOps check runs **never populate the `pull_requests[]` array**. This means `github.event.check_run.pull_requests[0] != null` was **always false**, and the workflow never ran. **Fix**: Reverted to `pull_request_target` trigger with a comment explaining why `check_run` does not work. ### 2. AzDO direct fallback (both scripts) When the GitHub Checks API does not return build info (which can happen for merge commits or in certain timing windows), the scripts now fall back to querying the Azure DevOps API directly using `refs/pull/{PR}/merge` branch name. This approach is modeled after the working implementation in [maui-version](https://github.com/jfversluis/maui-version). ### 3. In-progress build detection (both scripts) When no completed build is found, the scripts now query AzDO for builds with `status in ("inProgress", "notStarted", "postponed")`. Instead of the generic "no build found" error, users now see: - **Build in progress**: "A build is currently in progress. Please wait for it to complete." - **Stale artifacts**: When an older build has artifacts but a newer build is running, warns users ### Additional improvements - Build ID numeric validation to prevent URL injection - PR number validation in bash script - Protection against `set -e` crashes on invalid `jq` input - Better error messages for all failure scenarios ## Testing Tested locally with multiple real PRs across both scripts: - ✅ PR #34216 (completed, successful) - both scripts find build and apply artifacts - ✅ PR #34250 (in-progress build) - correctly finds existing artifacts with warning - ✅ PR #99999999 (non-existent) - proper error handling - ✅ Invalid PR number ("abc") - input validation works - ✅ Multi-model code review (Claude Sonnet 4.5, GPT-5.1, Gemini 3 Pro) - all findings addressed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jfversluis
pushed a commit
to yuriikyry4enko/maui
that referenced
this pull request
Feb 26, 2026
These likely came over from the migration from xamarin/Xamarin.Forms -> dotnet/maui. `$(DebugType)=full` seems be causing the error at: * dotnet#34201 ``` src\Controls\tests\Xaml.UnitTests\Issues\Gh2007.rtxc.xaml(3,9): XamlC warning XC0022: Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information. [D:\a\_work\1\s\src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj] Fatal error. 0xC0000005 at Mono.Cecil.Pdb.ISymUnmanagedWriter2.Close() at Mono.Cecil.Pdb.SymWriter.Close() at Mono.Cecil.Pdb.NativePdbWriter.Write() at Mono.Cecil.ModuleWriter.Write(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleWriter.WriteModule(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(System.IO.Stream, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(Mono.Cecil.WriterParameters) at Mono.Cecil.AssemblyDefinition.Write(Mono.Cecil.WriterParameters) at Microsoft.Maui.Controls.Build.Tasks.XamlCTask.Execute(System.Collections.Generic.IList`1<System.Exception> ByRef) at Microsoft.Maui.Controls.Build.Tasks.XamlTask.Execute() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__25.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__23 ByRef) at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__19.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__18.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__13.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__50.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__43.MoveNext() at Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.Tasks.TaskSchedulerAwaitTaskContinuation+<>c.<Run>b__2_0(System.Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) at System.Threading.Tasks.Task.ExecuteEntry() at Microsoft.Build.BackEnd.RequestBuilder+DedicatedThreadsTaskScheduler.<InjectThread>b__6_0() at System.Threading.Thread+StartHelper.Callback(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.Thread.StartCallback() Build failed with exit code 57005. Check errors above. ``` We shouldn't be using Windows-specific debug settings in a cross-platform project -- the `$(DebugType)` setting is not needed. I went through a couple projects and found old debugging settings that would have been needed in non-SDK-style projects, but are not needed in SDK-style projects. Removing those settings to cleanup the repo.
Tamilarasan-Paranthaman
pushed a commit
that referenced
this pull request
Mar 2, 2026
…ss handling (#34259) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description Three fixes for the dogfooding infrastructure that was merged in #33198 but never worked correctly: ### 1. Workflow trigger fix (`dogfood-comment.yml`) The workflow was changed from `pull_request_target` to `check_run` trigger in #33198, but Azure DevOps check runs **never populate the `pull_requests[]` array**. This means `github.event.check_run.pull_requests[0] != null` was **always false**, and the workflow never ran. **Fix**: Reverted to `pull_request_target` trigger with a comment explaining why `check_run` does not work. ### 2. AzDO direct fallback (both scripts) When the GitHub Checks API does not return build info (which can happen for merge commits or in certain timing windows), the scripts now fall back to querying the Azure DevOps API directly using `refs/pull/{PR}/merge` branch name. This approach is modeled after the working implementation in [maui-version](https://github.com/jfversluis/maui-version). ### 3. In-progress build detection (both scripts) When no completed build is found, the scripts now query AzDO for builds with `status in ("inProgress", "notStarted", "postponed")`. Instead of the generic "no build found" error, users now see: - **Build in progress**: "A build is currently in progress. Please wait for it to complete." - **Stale artifacts**: When an older build has artifacts but a newer build is running, warns users ### Additional improvements - Build ID numeric validation to prevent URL injection - PR number validation in bash script - Protection against `set -e` crashes on invalid `jq` input - Better error messages for all failure scenarios ## Testing Tested locally with multiple real PRs across both scripts: - ✅ PR #34216 (completed, successful) - both scripts find build and apply artifacts - ✅ PR #34250 (in-progress build) - correctly finds existing artifacts with warning - ✅ PR #99999999 (non-existent) - proper error handling - ✅ Invalid PR number ("abc") - input validation works - ✅ Multi-model code review (Claude Sonnet 4.5, GPT-5.1, Gemini 3 Pro) - all findings addressed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
TamilarasanSF4853
pushed a commit
to TamilarasanSF4853/maui
that referenced
this pull request
Mar 2, 2026
These likely came over from the migration from xamarin/Xamarin.Forms -> dotnet/maui. `$(DebugType)=full` seems be causing the error at: * dotnet#34201 ``` src\Controls\tests\Xaml.UnitTests\Issues\Gh2007.rtxc.xaml(3,9): XamlC warning XC0022: Binding could be compiled to improve runtime performance if x:DataType is specified. See https://learn.microsoft.com/dotnet/maui/fundamentals/data-binding/compiled-bindings for more information. [D:\a\_work\1\s\src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj] Fatal error. 0xC0000005 at Mono.Cecil.Pdb.ISymUnmanagedWriter2.Close() at Mono.Cecil.Pdb.SymWriter.Close() at Mono.Cecil.Pdb.NativePdbWriter.Write() at Mono.Cecil.ModuleWriter.Write(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleWriter.WriteModule(Mono.Cecil.ModuleDefinition, Mono.Disposable`1<System.IO.Stream>, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(System.IO.Stream, Mono.Cecil.WriterParameters) at Mono.Cecil.ModuleDefinition.Write(Mono.Cecil.WriterParameters) at Mono.Cecil.AssemblyDefinition.Write(Mono.Cecil.WriterParameters) at Microsoft.Maui.Controls.Build.Tasks.XamlCTask.Execute(System.Collections.Generic.IList`1<System.Exception> ByRef) at Microsoft.Maui.Controls.Build.Tasks.XamlTask.Execute() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteInstantiatedTask>d__25.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.Build.BackEnd.TaskBuilder+<InitializeAndExecuteTask>d__23, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<InitializeAndExecuteTask>d__23 ByRef) at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteBucket>d__19.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__18.MoveNext() at Microsoft.Build.BackEnd.TaskBuilder+<ExecuteTask>d__13.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ProcessBucket>d__50.MoveNext() at Microsoft.Build.BackEnd.TargetEntry+<ExecuteTarget>d__43.MoveNext() at Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24.MoveNext() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib, Version=11.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.Build.BackEnd.TargetBuilder+<ProcessTargetStack>d__24, Microsoft.Build, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].MoveNext() at System.Threading.Tasks.TaskSchedulerAwaitTaskContinuation+<>c.<Run>b__2_0(System.Object) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) at System.Threading.Tasks.Task.ExecuteEntry() at Microsoft.Build.BackEnd.RequestBuilder+DedicatedThreadsTaskScheduler.<InjectThread>b__6_0() at System.Threading.Thread+StartHelper.Callback(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.Thread.StartCallback() Build failed with exit code 57005. Check errors above. ``` We shouldn't be using Windows-specific debug settings in a cross-platform project -- the `$(DebugType)` setting is not needed. I went through a couple projects and found old debugging settings that would have been needed in non-SDK-style projects, but are not needed in SDK-style projects. Removing those settings to cleanup the repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These likely came over from the migration from xamarin/Xamarin.Forms -> dotnet/maui.
$(DebugType)=fullseems be causing the error at:We shouldn't be using Windows-specific debug settings in a cross-platform project -- the
$(DebugType)setting is not needed.I went through a couple projects and found old debugging settings that would have been needed in non-SDK-style projects, but are not needed in SDK-style projects. Removing those settings to cleanup the repo.