Skip to content

Change analyzer references to use the standard/recommended form #34596

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

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

roji
Copy link
Member

@roji roji commented Sep 2, 2024

I've been hitting some build issues related to EFDiagnostics - a static class of constants that lives inside EFCore.Analyzers and used from the our projects. Interestingly, the EFCore projects references EFCore.Analyzers with PrivateAssets="contentfiles;build"; the other projects (Relational, Cosmos...) reference it with ReferenceOutputAssembly="False" OutputItemType="Analyzer" - which is the proper way to refer to analyzers (docs). It seems like only the EFCore dependency on EFCore.Analyzers allows using EFDiagnostics - if I change it to also use ReferenceOutputAssembly="False" OutputItemType="Analyzer", I'm no longer able to use EFDiagnostics.

This PR changes things to work in the standard/recommend way: only ReferenceOutputAssembly="False" OutputItemType="Analyzer" is used to reference EFCore.Analyzers, and EFDiagnostics is moved to Shared.

@roji roji requested a review from a team September 2, 2024 12:19
@roji roji enabled auto-merge (squash) September 2, 2024 12:19
@roji roji disabled auto-merge September 2, 2024 15:13
@roji roji marked this pull request as draft September 2, 2024 15:13
@roji roji marked this pull request as ready for review September 17, 2024 12:55
@roji roji merged commit 6042eb7 into dotnet:main Sep 17, 2024
7 checks passed
@roji roji deleted the AnalyzerReferences branch September 17, 2024 12:55
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.

2 participants