Skip to content
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

Fix build when using source generators coming from NuGet packages. #6798

Closed
wants to merge 1 commit into from

Conversation

dipeshmsft
Copy link
Member

@dipeshmsft dipeshmsft commented Jul 14, 2022

Fixes #6792

Main PR #6793

Description
Fixes build of project using source generators coming from NuGet packages. I fixed this by only including analyzers that are coming from a FrameworkReference in the temporary target assembly project. Those analyzers are the ones that are not automatically added in the temporary target assembly project because ResolveTargetingPackAssets is never called (We could investigate calling this target in the future but, to me, it seemed riskier than the changes in this PR).

Customer Impact
Fixes build.

Regression
This is a regression introduced in .Net 6.0.7 by #6534 which was backported by #6680. Those were changes from me, sorry about the regression.

Testing
Tested locally by building a project which uses Regex source generator, WinForms source generator and CommunityToolkit.Mvvm 7.1.2 source generator (This is an example of a source generator that currently fails on .Net 6.0.7 SDK).

Risk
Low.

Microsoft Reviewers: Open in CodeFlow

@dipeshmsft dipeshmsft requested a review from a team as a code owner July 14, 2022 15:27
@ghost ghost assigned dipeshmsft Jul 14, 2022
@ghost ghost added the PR metadata: Label to tag PRs, to facilitate with triage label Jul 14, 2022
@ghost ghost requested review from singhashish-wpf and SamBent July 14, 2022 15:27
@ghost
Copy link

ghost commented Jul 14, 2022

Hi @dipeshmsft. Please make sure you've updated the PR description to use the Shiproom Template. Also, make sure this PR is not marked as a draft and is ready-to-merge.

To learn more about how to prepare a servicing PR click here.

@dipeshmsft dipeshmsft closed this Jul 14, 2022
@dipeshmsft dipeshmsft deleted the srcgenfix6 branch July 14, 2022 15:43
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants