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

Disable Source Link's EmbedUntrackedSources in desktop WPF projects #37164

Merged
merged 6 commits into from
Dec 7, 2023

Conversation

tmat
Copy link
Member

@tmat tmat commented Nov 27, 2023

Adds a workaround for #34438:

Suppress EmbedUntrackedSources set by Source Link for Desktop WPF projects, which produce incorrect #line directive in generated .g.cs files under certain circumstances. When EmbedUntrackedSources is enabled it triggers embedding of source files into the PDB, which fails due to the incorrect #line directives.

#36585 tracks the core issue.

Customer Impact

Project with the following properties fails to build with .NET SDK 8:

  • targets .NET Framework
  • uses .NET SDK
  • does not set UseWPF property to true
  • uses manual XAML assembly references
  • customizes IntermediateOutputPath
  • is in a git repository

Regression?

  • Yes
  • No

7.0

Risk

  • High
  • Medium
  • Low

The change sets property that enables the same code path that's already executed in regular build to run in design-time build.

Verification

  • Manual (required)
  • Automated

Packaging changes reviewed?

  • Yes
  • No
  • N/A

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Nov 27, 2023
@tmat tmat marked this pull request as ready for review November 27, 2023 21:22
@tmat
Copy link
Member Author

tmat commented Nov 27, 2023

/azp run

@tmat tmat marked this pull request as draft November 27, 2023 21:23
@tmat tmat marked this pull request as ready for review November 27, 2023 23:18
@tmat
Copy link
Member Author

tmat commented Nov 27, 2023

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tmat
Copy link
Member Author

tmat commented Nov 29, 2023

@KirillOsenkov FYI

@tmat
Copy link
Member Author

tmat commented Nov 29, 2023

@dsplaisted @rainersigwald PTAL

@tmat tmat self-assigned this Nov 29, 2023
@tmat tmat added Servicing-consider and removed untriaged Request triage from a team member labels Nov 29, 2023
Copy link
Member

@KirillOsenkov KirillOsenkov left a comment

Choose a reason for hiding this comment

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

Very nice, thank you!

@leecow leecow added this to the 8.0.2 milestone Dec 5, 2023
@tmat tmat enabled auto-merge (squash) December 5, 2023 21:40
@tmat tmat changed the title Disable Source Link in desktop WPF temp projects Disable Source Link's EmbedUntrackedSources in desktop WPF projects Dec 6, 2023
@tmat tmat merged commit 32d702f into dotnet:release/8.0.1xx Dec 7, 2023
16 checks passed
@tmat tmat deleted the WpfWorkaround branch December 7, 2023 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants