Closed aktxyz closed 2 years ago
I just found that by using a 3.11.0 version of Microsoft.CodeAnalysis.CSharp, the build errors are resolved.
So now using this
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" PrivateAssets="all" />
instead of this or this
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" PrivateAssets="all" />
@jaredpar what is the guidance for how to have multiple Source Generators that reference different versions of Microsoft.CodeAnalysis.CSharp? Shouldn't the compiler server handle resolution and force it to unify?
Shouldn't the compiler server handle resolution and force it to unify?
Yes the compiler server will force it to unify.
Are we sure that is what is happening here? The customer "fixed" the problem by changing the set of <PackageReference>
in the project. That should in no way impact how the compiler server resolves dependencies in generators.
It sure looks like it. @captainsafia / @pranavkm any other ideas?
Do we have a binlog of the failure or a crash dump to look at?
@chsienki, @RikkiGibson
@aktxyz could you share a minimal app that reproduces the problem? Alternatively, if you could share your binlogs with us that might be helpful.
Hi @aktxyz. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.
I am working on a simple vs solution example for this
Hi @aktxyz. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.
I just updated from VS2022 preview to the final VS2022 (17.0.3) ... and some projects that have both razor pages AND reference a netstandard2.0 source generator project, now fail to compile with the error
I have other projects that just reference this source generator project and DO NOT have any razor pages, and those projects compile fine. It seems like there is a conflict between what razor is using to code generate and what my own source generator uses.
Is there a known issue with this scenario?