Skip to content

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
@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