Skip to content

[XSG] disable #line info by default - #32423

Merged
PureWeen merged 1 commit into
mainfrom
dev/stdelc/disablelineinfo
Nov 6, 2025
Merged

PureWeen merged 1 commit into
mainfrom
dev/stdelc/disablelineinfo

Conversation

@StephaneDelcroix

Copy link
Copy Markdown
Contributor

Description of Change

there are too many situation where it cause or might cause issues with wrong pdbs. disable it for now.

there are too many situation where it cause or might cause issues with
wrong pdbs. disable it for now.
Copilot AI review requested due to automatic review settings November 6, 2025 10:19
@StephaneDelcroix StephaneDelcroix added this to the .NET 10.0 SR1 milestone Nov 6, 2025
@StephaneDelcroix StephaneDelcroix added the p/0 Current heighest priority issues that we are targeting for a release. label Nov 6, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.cs to 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 DiagnosticShowsLocationInInputXamlFile doesn't explicitly set lineinfo parameter, defaulting to 'enable'. With the new default behavior of EnableLineInfo being false, this test may need updating to explicitly pass lineinfo: '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);

@StephaneDelcroix

Copy link
Copy Markdown
Contributor Author

/azp run MAUI-UITests-public

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen
PureWeen merged commit 2f30758 into main Nov 6, 2025
@PureWeen
PureWeen deleted the dev/stdelc/disablelineinfo branch November 6, 2025 23:18
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

p/0 Current heighest priority issues that we are targeting for a release.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants