Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the NuGet packing process so the source generator + code fixes are built and packaged as separate analyzer assemblies per Roslyn version, allowing NuGet/MSBuild to pick a host-compatible analyzer at install/build time.
Changes:
- Build analyzer variants for Roslyn 4.8.0 and 5.0.0 during pack and place them under
analyzers/dotnet/roslyn{X.Y}/cs/. - Update the generator’s
ROSLYN_5_0_OR_LATERconditional compilation symbol to be driven by$(RoslynAnalyzerVersion)instead of the host SDK version. - Exclude canonical
bin/andobj/from default compile globs in analyzer projects to avoid AssemblyInfo duplication during variant builds.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/EntityFrameworkCore.Projectables.Generator/EntityFrameworkCore.Projectables.Generator.csproj | Adjusts ROSLYN_5_0_OR_LATER definition to follow RoslynAnalyzerVersion and excludes bin/obj from default compile items. |
| src/EntityFrameworkCore.Projectables.CodeFixes/EntityFrameworkCore.Projectables.CodeFixes.csproj | Excludes bin/obj from default compile items to prevent duplicate compilation inputs during variant builds. |
| src/EntityFrameworkCore.Projectables.Abstractions/EntityFrameworkCore.Projectables.Abstractions.csproj | Adds pack-time targets to build Roslyn-specific analyzer variants and packs those DLLs into Roslyn-versioned analyzer folders. |
Member
|
Thanks, I was looking for a way to fix it this way, but could not take a decision on the best way |
PhenX
approved these changes
Apr 30, 2026
PhenX
approved these changes
Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #205