Skip to content

Conversation

@AndriySvyryd
Copy link
Member

Fixes #36555

@AndriySvyryd AndriySvyryd requested a review from a team as a code owner August 13, 2025 23:41
@AndriySvyryd AndriySvyryd requested review from Copilot and removed request for a team August 13, 2025 23:41
Copy link

Copilot AI left a comment

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 fixes the NuGet package dependency configuration for the EFCore package to properly include the Analyzers package as a dependency. The change modifies how the EFCore.Analyzers project reference is handled in the build process.

Key changes:

  • Updates the project reference configuration for EFCore.Analyzers to use PrivateAssets instead of ReferenceOutputAssembly="False" OutputItemType="Analyzer"
Comments suppressed due to low confidence (1)

src/EFCore/EFCore.csproj:56

  • The PrivateAssets configuration may not properly handle analyzer dependencies. For analyzer packages, consider using PrivateAssets="all" and IncludeAssets="runtime; build; native; contentfiles; analyzers" to ensure the analyzer is properly included in the consuming package while preventing transitive dependencies.
    <ProjectReference Include="..\EFCore.Analyzers\EFCore.Analyzers.csproj" PrivateAssets="contentfiles;build" />

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

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

Odd, I'm pretty sure there was documentation showing OutputItemType="Analyzer".

@AndriySvyryd
Copy link
Member Author

Odd, I'm pretty sure there was documentation showing OutputItemType="Analyzer".

Was it showing how to reference an analyzer or how to depend on an analyzer? 🤔

@AndriySvyryd AndriySvyryd enabled auto-merge (squash) August 14, 2025 00:04
@AndriySvyryd AndriySvyryd merged commit c05f1c9 into main Aug 14, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the Issue36555 branch August 14, 2025 00:21
@roji
Copy link
Member

roji commented Aug 14, 2025

I'm not sure anymore... But I originally submitted #34596 (which caused the problem) to deal with trouble around EFDiagnostics, and everything still seems fine around that, so it seems like we're good on all fronts...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Microsoft.EntityFrameworkCore.Analyzers not referenced

3 participants