Skip to content

Embed AnalyzerConfigFiles in binlog#82741

Open
Copilot wants to merge 8 commits intomainfrom
copilot/add-analyzer-config-embedding
Open

Embed AnalyzerConfigFiles in binlog#82741
Copilot wants to merge 8 commits intomainfrom
copilot/add-analyzer-config-embedding

Conversation

Copy link
Contributor

Copilot AI commented Mar 13, 2026

Adds AnalyzerConfigFiles (EditorConfigFiles) to the EmbedInBinlog item group so their exact content is captured in binary logs.

Changes Made

  • Added <EmbedInBinlog Include="@(EditorConfigFiles)" /> at the top of the CoreCompile target body in both Microsoft.CSharp.Core.targets and Microsoft.VisualBasic.Core.targets. Placing it inside CoreCompile (rather than a static evaluation-time ItemGroup) ensures that EditorConfigFiles added by analyzer packages (e.g., NetAnalyzers, CodeStyle) in their own BeforeTargets="CoreCompile" targets are captured.
  • Updated the test helper's overridden CoreCompile in DotNetSdkTestBase.cs to include the same EmbedInBinlog ItemGroup so SDK tests continue to work.
  • Added GenerateEditorConfigIsEmbeddedInBinlog test in TargetTests.cs verifying the MSBuild-generated editor config is embedded and its contents are correct.
  • Added TestEditorConfigFilesAddedByAnalyzerPackagesAreEmbeddedInBinlog test in DotNetSdkTests.cs simulating an analyzer package adding an EditorConfigFile via BeforeTargets="CoreCompile" and verifying it appears in @(EmbedInBinlog). The test disables automatic discovery for deterministic, cross-platform results.
Original prompt

This section details on the original issue you should resolve

<issue_title>Consider embedding analyzer config files in binlog</issue_title>
<issue_description>I think today AnalyzerConfigFiles are not added to EmbedInBinlog item. Embedding them allows to easily see the exact content of those config files in binlogs.</issue_description>

Comments on the Issue (you are @copilot in this section)


📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add embedding of analyzer config files in binlog Embed AnalyzerConfigFiles in binlog Mar 13, 2026
Copilot AI requested a review from jjonescz March 13, 2026 12:22
Copy link
Member

@jjonescz jjonescz left a comment

Choose a reason for hiding this comment

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

… file contents

Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copilot AI requested a review from jjonescz March 13, 2026 13:00
@jjonescz jjonescz marked this pull request as ready for review March 13, 2026 14:43
@jjonescz jjonescz requested a review from a team as a code owner March 13, 2026 14:43
…target and add test

Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copy link
Member

@jjonescz jjonescz left a comment

Choose a reason for hiding this comment

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

…w string literals

Co-authored-by: jjonescz <3669664+jjonescz@users.noreply.github.com>
Copilot AI requested a review from jjonescz March 13, 2026 20:07
Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>
@jjonescz jjonescz marked this pull request as draft March 13, 2026 21:01
@jjonescz jjonescz marked this pull request as ready for review March 16, 2026 15:05
@jjonescz jjonescz requested a review from a team as a code owner March 16, 2026 15:05
@jjonescz
Copy link
Member

@jaredpar FYI

@jjonescz jjonescz requested a review from a team March 16, 2026 19:37
@jjonescz
Copy link
Member

@dotnet/roslyn-compiler for the second compiler review, thanks

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.

Consider embedding analyzer config files in binlog

6 participants