question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Roslyn crashes during source generation when using new `ForAttributeWithMetadataName` API

See original GitHub issue

Version Used: 4.4.0-1.22369.1 (.NET 7 Preview 7)

Steps to Reproduce:

  1. Update dotnet/runtime’s Version.props to use the specified version of Roslyn.
  2. Update the EventSourceGenerator to use the official ForAttributeWithMetadataName API.
  3. Build the System.Private.CoreLib project with ./build clr.corelib.

Expected Behavior:

The build succeeds.

Actual Behavior:

The build fails with a NotImplementedException thrown at https://github.com/dotnet/roslyn/blob/8f42214b41e4c99db1dfa834f811d4d153985eb9/src/Compilers/Core/Portable/CommandLine/CommonCompiler.LoggingMetadataFileReferenceResolver.cs#L44

Here’s the full stack trace:

Stack Trace
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.LoggingMetadataFileReferenceResolver.GetHashCode() Line 44
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.LoggingMetadataFileReferenceResolver.cs(44)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.ExistingReferencesResolver.GetHashCode() Line 72
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.ExistingReferencesResolver.cs(72)
Microsoft.CodeAnalysis.dll!Roslyn.Utilities.Hash.Combine<System.__Canon>(System.__Canon newKeyPart, int currentKey) Line 39
	at /_/src/Compilers/Core/Portable/InternalUtilities/Hash.cs(39)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CompilationOptions.GetHashCodeHelper() Line 671
	at /_/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs(671)
Microsoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.CSharpCompilationOptions.ComputeHashCode() Line 755
	at /_/src/Compilers/CSharp/Portable/CSharpCompilationOptions.cs(755)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CompilationOptions.GetHashCode() Line 660
	at /_/src/Compilers/Core/Portable/Compilation/CompilationOptions.cs(660)
System.Private.CoreLib.dll!System.Collections.Generic.HashSet<Microsoft.CodeAnalysis.CompilationOptions>.AddIfNotPresent(Microsoft.CodeAnalysis.CompilationOptions value, out int location) Line 1101
	at /_/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs(1101)
System.Private.CoreLib.dll!System.Collections.Generic.HashSet<System.__Canon>.Add(System.__Canon item) Line 453
	at /_/src/libraries/System.Private.CoreLib/src/System/Collections/Generic/HashSet.cs(453)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.InputNode<Microsoft.CodeAnalysis.CompilationOptions>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder graphState, Microsoft.CodeAnalysis.NodeStateTable<Microsoft.CodeAnalysis.CompilationOptions> previousTable, System.Threading.CancellationToken cancellationToken) Line 94
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/InputNode.cs(94)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<Microsoft.CodeAnalysis.CompilationOptions>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<Microsoft.CodeAnalysis.CompilationOptions> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<Microsoft.CodeAnalysis.CompilationOptions, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CombineNode<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder graphState, Microsoft.CodeAnalysis.NodeStateTable<(Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)> previousTable, System.Threading.CancellationToken cancellationToken) Line 33
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/CombineNode.cs(33)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<(Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<(Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<(Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases), Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CombineNode<Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder graphState, Microsoft.CodeAnalysis.NodeStateTable<(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)> previousTable, System.Threading.CancellationToken cancellationToken) Line 33
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/CombineNode.cs(33)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<(Microsoft.CodeAnalysis.SyntaxTree, Microsoft.CodeAnalysis.SourceGeneration.GlobalAliases), (Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), (Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CombineNode<(Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), Microsoft.CodeAnalysis.Compilation>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder graphState, Microsoft.CodeAnalysis.NodeStateTable<((Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), Microsoft.CodeAnalysis.Compilation)> previousTable, System.Threading.CancellationToken cancellationToken) Line 32
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/CombineNode.cs(32)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<((Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), Microsoft.CodeAnalysis.Compilation)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<((Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), Microsoft.CodeAnalysis.Compilation)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<((Microsoft.CodeAnalysis.SyntaxTree, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.SyntaxNode>), Microsoft.CodeAnalysis.Compilation), Generators.EventSourceGenerator.EventSourceClass>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<Generators.EventSourceGenerator.EventSourceClass> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<Generators.EventSourceGenerator.EventSourceClass>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<Generators.EventSourceGenerator.EventSourceClass> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.TransformNode<Generators.EventSourceGenerator.EventSourceClass, Generators.EventSourceGenerator.EventSourceClass>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder builder, Microsoft.CodeAnalysis.NodeStateTable<Generators.EventSourceGenerator.EventSourceClass> previousTable, System.Threading.CancellationToken cancellationToken) Line 45
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/TransformNode.cs(45)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<Generators.EventSourceGenerator.EventSourceClass>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<Generators.EventSourceGenerator.EventSourceClass> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.SourceOutputNode<Generators.EventSourceGenerator.EventSourceClass>.UpdateStateTable(Microsoft.CodeAnalysis.DriverStateTable.Builder graphState, Microsoft.CodeAnalysis.NodeStateTable<(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.GeneratedSourceText>, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostic>)> previousTable, System.Threading.CancellationToken cancellationToken) Line 41
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/SourceOutputNode.cs(41)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.DriverStateTable.Builder.GetLatestStateTableForNode<(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.GeneratedSourceText>, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostic>)>(Microsoft.CodeAnalysis.IIncrementalGeneratorNode<(System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.GeneratedSourceText>, System.Collections.Generic.IEnumerable<Microsoft.CodeAnalysis.Diagnostic>)> source) Line 60
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/DriverStateTable.cs(60)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.SourceOutputNode<Generators.EventSourceGenerator.EventSourceClass>.AppendOutputs(Microsoft.CodeAnalysis.IncrementalExecutionContext context, System.Threading.CancellationToken cancellationToken) Line 98
	at /_/src/Compilers/Core/Portable/SourceGeneration/Nodes/SourceOutputNode.cs(98)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.GeneratorDriver.UpdateOutputs(System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.IIncrementalGeneratorOutputNode> outputNodes, Microsoft.CodeAnalysis.IncrementalGeneratorOutputKind outputKind, Microsoft.CodeAnalysis.GeneratorRunStateTable.Builder generatorRunStateBuilder, System.Threading.CancellationToken cancellationToken, Microsoft.CodeAnalysis.DriverStateTable.Builder driverStateBuilder) Line 295
	at /_/src/Compilers/Core/Portable/SourceGeneration/GeneratorDriver.cs(295)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.GeneratorDriver.RunGeneratorsCore(Microsoft.CodeAnalysis.Compilation compilation, Microsoft.CodeAnalysis.DiagnosticBag diagnosticsBag, System.Threading.CancellationToken cancellationToken) Line 268
	at /_/src/Compilers/Core/Portable/SourceGeneration/GeneratorDriver.cs(268)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.GeneratorDriver.RunGeneratorsAndUpdateCompilation(Microsoft.CodeAnalysis.Compilation compilation, out Microsoft.CodeAnalysis.Compilation outputCompilation, out System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostic> diagnostics, System.Threading.CancellationToken cancellationToken) Line 55
	at /_/src/Compilers/Core/Portable/SourceGeneration/GeneratorDriver.cs(55)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.RunGenerators(Microsoft.CodeAnalysis.Compilation input, Microsoft.CodeAnalysis.ParseOptions parseOptions, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISourceGenerator> generators, Microsoft.CodeAnalysis.Diagnostics.AnalyzerConfigOptionsProvider analyzerConfigOptionsProvider, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.AdditionalText> additionalTexts, Microsoft.CodeAnalysis.DiagnosticBag generatorDiagnostics) Line 760
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs(760)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.CompileAndEmit(Microsoft.CodeAnalysis.TouchedFileLogger touchedFilesLogger, ref Microsoft.CodeAnalysis.Compilation compilation, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer> analyzers, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.ISourceGenerator> generators, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.AdditionalText> additionalTextFiles, Microsoft.CodeAnalysis.AnalyzerConfigSet analyzerConfigSet, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.AnalyzerConfigOptionsResult> sourceFileAnalyzerConfigOptions, System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.EmbeddedText> embeddedTexts, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, System.Threading.CancellationToken cancellationToken, out System.Threading.CancellationTokenSource analyzerCts, out Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver analyzerDriver, out Microsoft.CodeAnalysis.GeneratorDriverTimingInfo? generatorTimingInfo) Line 1028
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs(1028)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.RunCore(System.IO.TextWriter consoleOutput, Microsoft.CodeAnalysis.ErrorLogger errorLogger, System.Threading.CancellationToken cancellationToken) Line 897
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs(897)
Microsoft.CodeAnalysis.dll!Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter consoleOutput, System.Threading.CancellationToken cancellationToken) Line 707
	at /_/src/Compilers/Core/Portable/CommandLine/CommonCompiler.cs(707)
VBCSCompiler.dll!Microsoft.CodeAnalysis.CompilerServer.CompilerServerHost.RunCompilation(Microsoft.CodeAnalysis.CompilerServer.RunRequest request, System.Threading.CancellationToken cancellationToken) Line 155
	at /_/src/Compilers/Server/VBCSCompiler/CompilerRequestHandler.cs(155)
VBCSCompiler.dll!Microsoft.CodeAnalysis.CompilerServer.CompilerServerHost.Microsoft.CodeAnalysis.CompilerServer.ICompilerServerHost.RunCompilation(Microsoft.CodeAnalysis.CompilerServer.RunRequest request, System.Threading.CancellationToken cancellationToken)
VBCSCompiler.dll!Microsoft.CodeAnalysis.CompilerServer.ClientConnectionHandler.ProcessCompilationRequestAsync.AnonymousMethod__1() Line 168
	at /_/src/Compilers/Server/VBCSCompiler/ClientConnectionHandler.cs(168)
System.Private.CoreLib.dll!System.Threading.Tasks.Task<Microsoft.CodeAnalysis.CommandLine.BuildResponse>.InnerInvoke() Line 503
	at /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Future.cs(503)
System.Private.CoreLib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Line 183
	at /_/src/libraries/System.Private.CoreLib/src/System/Threading/ExecutionContext.cs(183)
System.Private.CoreLib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot, System.Threading.Thread threadPoolThread) Line 2345
	at /_/src/libraries/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs(2345)

It looks like the comparer used for the CompilationOptions provider still expects the type to provide a HashCode implementation.

https://github.com/dotnet/roslyn/blob/8f42214b41e4c99db1dfa834f811d4d153985eb9/src/Compilers/Core/Portable/SourceGeneration/IncrementalContexts.cs#L44-L50

This issue is blocking the dotnet/runtime repository from moving to the official ForAttributeWithMetadataName API.

cc: @chsienki @CyrusNajmabadi

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Nirmal4Gcommented, Oct 10, 2022

@tomachristian You either need to wait for the v4.3.1 compiler ship via .NET SDK and VS IDE or use the compiler that is available from NuGet.

0reactions
tomachristiancommented, Oct 10, 2022

Understood, thank you @Nirmal4G! Using the 4.3.1 compiler explicitly works.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Incremental Roslyn Source Generators In .NET 6
Creation of a New Incremental Source Generator. Sample Console Application. First Dry Run (or Rather Crash). Smart Enumification. NuGet Packaging.
Read more >
Source Generators
This article provides an overview of Source Generators that ships as part of the .NET Compiler Platform ("Roslyn") SDK.
Read more >
The pain points of C# source generators - Turnerj
In my case with Schema.NET, I'm generating hundreds of classes based on some JSON so I have minimal boilerplate. I could have gone...
Read more >
Material about C# source generators : r/csharp
I'm expecially focused on incremental source gen (with roslyn) and regex source gen. ... NET 6 source generator APIs I've come across.
Read more >
Prevent (some) MEF loading crashes with a Roslyn Analyzer
There are several reasons why a MEF failure might happen. A common reason is when an exception is thrown in a MEF ImportingConstructor....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found