StackOverFlowException:
at System.Collections.Generic.HashSet`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Add(System.__Canon)
at Mono.Linker.LinkContext.GetMethodIL(Mono.Cecil.MethodDefinition)
at Mono.Linker.LinkContext.GetMethodIL(Mono.Cecil.Cil.MethodBody)
at Mono.Linker.Dataflow.CompilerGeneratedState.<GetCompilerGeneratedStateForType>g__ScanForInit|11_2(Mono.Cecil.TypeDefinition, Mono.Cecil.Cil.MethodBody,
...
at Mono.Linker.Dataflow.CompilerGeneratedState.GetCompilerGeneratedStateForType(Mono.Cecil.TypeDefinition)
at Mono.Linker.Dataflow.CompilerGeneratedState.GetGeneratedTypeAttributes(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.GetGeneratedTypeAttributes(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.BuildTypeAnnotations(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.GetAnnotations(Mono.Cecil.TypeDefinition)
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.
Issue Details
Repro:
`dotnet new console`
`app.csproj`:
```xml
Exenet8.0enableenabletruefalseNU1605;NU1603;NU1701
```
`dotnet publish`
Stack trace:
```
StackOverFlowException:
at System.Collections.Generic.HashSet`1[[System.__Canon, System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Add(System.__Canon)
at Mono.Linker.LinkContext.GetMethodIL(Mono.Cecil.MethodDefinition)
at Mono.Linker.LinkContext.GetMethodIL(Mono.Cecil.Cil.MethodBody)
at Mono.Linker.Dataflow.CompilerGeneratedState.g__ScanForInit|11_2(Mono.Cecil.TypeDefinition, Mono.Cecil.Cil.MethodBody,
...
at Mono.Linker.Dataflow.CompilerGeneratedState.GetCompilerGeneratedStateForType(Mono.Cecil.TypeDefinition)
at Mono.Linker.Dataflow.CompilerGeneratedState.GetGeneratedTypeAttributes(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.GetGeneratedTypeAttributes(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.BuildTypeAnnotations(Mono.Cecil.TypeDefinition)
at ILLink.Shared.TrimAnalysis.FlowAnnotations.GetAnnotations(Mono.Cecil.TypeDefinition)
```
/cc @LakshanF
Repro:
dotnet new console
app.csproj
:dotnet publish
Stack trace:
/cc @LakshanF