Repository navigation
[XSG] disable #line info by default - #32423
Merged
Merged
Conversation
there are too many situation where it cause or might cause issues with wrong pdbs. disable it for now.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR disables XAML line info generation by default to work around large PDB issues in Roslyn (issue #80952). The change modifies the default behavior from enabling line info in Debug builds to disabling it by default, while still allowing explicit opt-in via build properties.
Key Changes
- Changed default line info behavior from Debug-mode-enabled to always disabled by default in
ProjectItem.cs - Updated test expectations in
LineInfoTests.csto reflect the new default behavior by removing conditional compilation logic
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Controls/src/SourceGen/ProjectItem.cs | Changed EnableLineInfo default from Configuration.Equals("Debug") to false with comment explaining Roslyn PDB issue |
| src/Controls/tests/SourceGen.UnitTests/InitializeComponent/LineInfoTests.cs | Removed #if RELEASE/#else/#endif conditional compilation from LineInfoDisabledDefault() test to match new default behavior |
Comments suppressed due to low confidence (1)
src/Controls/tests/SourceGen.UnitTests/InitializeComponent/LineInfoTests.cs:30
- The first test
DiagnosticShowsLocationInInputXamlFiledoesn't explicitly setlineinfoparameter, defaulting to 'enable'. With the new default behavior ofEnableLineInfobeingfalse, this test may need updating to explicitly passlineinfo: 'enable'to match its expectation of finding line info, or it should be renamed to clarify it tests the enabled case.
var (result, _) = RunGenerator(xaml, string.Empty);
simonrozsival
approved these changes
Nov 6, 2025
Contributor
Author
|
/azp run MAUI-UITests-public |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Description of Change
there are too many situation where it cause or might cause issues with wrong pdbs. disable it for now.