-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
VS 16.8 Preview 3 breaks Source Generators #47681
Comments
CC: @chsienki |
@b-straub We've made some breaking changes to generators in preview 3 (see here: https://github.com/dotnet/roslyn/blob/master/docs/features/source-generators.cookbook.md#breaking-changes) We've yet to update the samples to match. I'll get on that ASAP |
The samples are now updated to the latest syntax |
Sure this works now, but not without adding an additional preview source!
and not the shipped one from VS 16.8 p3 with dotnet-sdk-5.0.100-rc.1.20452.10. |
@chsienki I assume we are going to publish the preview 3 nuget packages? |
Hmm, we're stuck in a weird middle ground then we're it seems that VS has shipped, but we haven't pushed the packages for it yet. @JoeRobich any idea when the packages will go to the public feed? |
With a grain of salt... I am curious. Will be interested to check things out. TL;DR, I will review in more depth, but on surface, I have in the past cautioned against allowing CG to be driven by too many in the way of concrete examples, i.e. the perenial In general, I have a couple of projects that are not driven by any such thing, but rather take their cues, sometimes from third party XML or JSON configuration files. Not dissilimar to T3 or T4 based template driven CG. Other times driven by external packaging, and an ANTLR (or parser) driven interpretation of a protobuf v2 input file, in another instance. In any event, could be triggered by an attribute, but does not necessarily need to be. additionally, could occur at an assembly level. In addition to which, I prefer to generate a sequence of modules, not necessarily one monolithc module. again, re: CG APIs, TL;DR. i.e. based on my experience with my own Code.Generation.Roslyn, in which case I prefer yielding a range of Questions? Thoughts? |
@JoeRobich @jmarolf @chsienki What does this mean, exactly? The target 16.8 delivery was made, but the packages were not included? Are the out of band? What's the story there... The Azure dotnet tools feed will work? |
Unsure of what you are asking. I am responding to this comment here. The version that shipped with visual studio version 16.8 were not yet uploaded to nuget so (unti recently) you needed to use the As of now I expect this bug to not be reproduceable for customers. |
@jmarolf I was not clear about that, appreciate the clarification. |
@jmarolf Perhaps the poignant question though... what actually ARE the packages, if you please? Package names? Or links even, would be helpful. Thank you... |
Version Used:
Version 16.8.0 Preview 3.0, updated from Preview 2.0 via VS installer.
Steps to Reproduce:
Expected Behavior:
No error
Actual Behavior:
CSC : warning CS8032: An instance of analyzer SourceGeneratorSamples.HelloWorldGenerator cannot be created from ...\roslyn-sdk\artifacts\bin\SourceGeneratorSamples\Debug\netstandard2.0\SourceGeneratorSamples.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
-> Same error for all SG
Reverting Microsoft.CodeAnalysis 3.8.0-2.final to 3.7.0 solves the problem somehow.
Updates:
Microsoft.CodeAnalysis.Common.3.8.0-2.final -> Microsoft.CodeAnalysis.Common.3.7.0
Microsoft.CodeAnalysis.CSharp.3.8.0-2.final -> Microsoft.CodeAnalysis.CSharp.3.7.0
System.Collections.Immutable.5.0.0-preview.8.20371.14 -> System.Collections.Immutable.1.5.0
System.Reflection.Metadata.5.0.0-preview.8.20371.14 -> System.Reflection.Metadata.1.6.0
Tried the same for the Blazor problem demo project: blazor-with-source-generators-poc
But no luck here when reverting Microsoft.CodeAnalysis 3.8.0-2.final to 3.7.0. Even the Console App build fails already:
The text was updated successfully, but these errors were encountered: