Closed AlexGoris-KasparSolutions closed 6 months ago
I'm having the same issue as well. Literally the identical problem. My project was working just fine a little over a week ago. Not sure what changed.
I have the same issue. After creating a new project, it can run when compiled using .NET 6.0, but it will report the same error when using .NET 7.0.
C:\Repos\sample-api via .NET v7.0.400 🎯 net7.0
❯ dotnet build
适用于 .NET MSBuild 版本 17.7.1+971bf70db
正在确定要还原的项目…
所有项目均是最新的,无法还原。
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Fatal error. Internal CLR error. (0x80131506) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.NetCore.Analyzers.InteropServices.PlatformCompatibilityAnalyzer+<>c__DisplayClass34_0.<AnalyzeOperationBlock>b__1(Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor+<>c__54`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<ExecuteBlockActions>b__54_1(System.ValueTuple`2<System.Action`1<Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo>, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo>, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteBlockActions[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.PooledObjects.PooledHashSet`1<System.__Canon>, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.SemanticModel, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Action`1<Microsoft.CodeAnalysis.Diagnostic>, System.Func`3<Microsoft.CodeAnalysis.Diagnostic,System.Threading.CancellationToken,Boolean>, System.Nullable`1<Microsoft.CodeAnalysis.Text.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteBlockActionsCore[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, System.Collections.Immutable.ImmutableArray`1<System.__Canon>, System.Func`2<System.Collections.Immutable.ImmutableArray`1<System.__Canon>,System.Collections.Generic.IEnumerable`1<System.__Canon>>, Microsoft.CodeAnalysis.SemanticModel, System.Func`2<Microsoft.CodeAnalysis.SyntaxNode,Int32>, System.Nullable`1<Microsoft.CodeAnalysis.Text.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<ExecuteDeclaringReferenceActions>g__executeOperationsBlockActions|6(System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Collections.Generic.IEnumerable`1<ExecutableCodeBlockAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>>) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<ExecuteDeclaringReferenceActions>g__executeExecutableCodeActions|2() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp,Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDeclaringReferenceActions(Microsoft.CodeAnalysis.SyntaxReference, Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>, Boolean, Boolean, Boolean, Boolean, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp,Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDeclaringReferenceActions(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope,Boolean, IGroupedAnalyzerActions, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessSymbolDeclaredAsync>d__137.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessSymbolDeclaredAsync>d__137, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<TryProcessSymbolDeclaredAsync>d__137 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessSymbolDeclaredAsync(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessEventCoreAsync>d__136.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessEventCoreAsync>d__136, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<TryProcessEventCoreAsync>d__136 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessEventCoreAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessEventAsync>d__134.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessEventAsync>d__134, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ProcessEventAsync>d__134 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessEventAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessCompilationEventsCoreAsync>d__133.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessCompilationEventsCoreAsync>d__133, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ProcessCompilationEventsCoreAsync>d__133 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessCompilationEventsCoreAsync(Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0+<<ProcessCompilationEventsAsync>b__2>d.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0+<<ProcessCompilationEventsAsync>b__2>d, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<ProcessCompilationEventsAsync>b__2>d ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0.<ProcessCompilationEventsAsync>b__2() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InnerInvoke() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart() [C:\Repos\sample-api\sample-api.csproj]
生成失败。
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Fatal error. Internal CLR error. (0x80131506) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.NetCore.Analyzers.InteropServices.PlatformCompatibilityAnalyzer+<>c__DisplayClass34_0.<AnalyzeOperationBlock>b__1(Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor+<>c__54`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<ExecuteBlockActions>b__54_1(System.ValueTuple`2<System.Action`1<Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo>, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.AnalysisContextInfo>, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteBlockActions[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.PooledObjects.PooledHashSet`1<System.__Canon>, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.SemanticModel, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Action`1<Microsoft.CodeAnalysis.Diagnostic>, System.Func`3<Microsoft.CodeAnalysis.Diagnostic,System.Threading.CancellationToken,Boolean>, System.Nullable`1<Microsoft.CodeAnalysis.Text.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteBlockActionsCore[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, System.Collections.Immutable.ImmutableArray`1<System.__Canon>, System.Func`2<System.Collections.Immutable.ImmutableArray`1<System.__Canon>,System.Collections.Generic.IEnumerable`1<System.__Canon>>, Microsoft.CodeAnalysis.SemanticModel, System.Func`2<Microsoft.CodeAnalysis.SyntaxNode,Int32>, System.Nullable`1<Microsoft.CodeAnalysis.Text.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<ExecuteDeclaringReferenceActions>g__executeOperationsBlockActions|6(System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Collections.Generic.IEnumerable`1<ExecutableCodeBlockAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>>) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].<ExecuteDeclaringReferenceActions>g__executeExecutableCodeActions|2() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp,Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDeclaringReferenceActions(Microsoft.CodeAnalysis.SyntaxReference, Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>, Boolean, Boolean, Boolean, Boolean, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp,Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDeclaringReferenceActions(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope,Boolean, IGroupedAnalyzerActions, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessSymbolDeclaredAsync>d__137.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessSymbolDeclaredAsync>d__137, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<TryProcessSymbolDeclaredAsync>d__137 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessSymbolDeclaredAsync(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessEventCoreAsync>d__136.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessEventCoreAsync>d__136, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<TryProcessEventCoreAsync>d__136 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryProcessEventCoreAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessEventAsync>d__134.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessEventAsync>d__134, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ProcessEventAsync>d__134 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessEventAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessCompilationEventsCoreAsync>d__133.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessCompilationEventsCoreAsync>d__133, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<ProcessCompilationEventsCoreAsync>d__133 ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.ProcessCompilationEventsCoreAsync(Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, Boolean, System.Threading.CancellationToken) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0+<<ProcessCompilationEventsAsync>b__2>d.MoveNext() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0+<<ProcessCompilationEventsAsync>b__2>d, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]](<<ProcessCompilationEventsAsync>b__2>d ByRef) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<>c__DisplayClass132_0.<ProcessCompilationEventsAsync>b__2() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.Tasks.Task`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InnerInvoke() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread) [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch() [C:\Repos\sample-api\sample-api.csproj]
C:\Program Files\dotnet\sdk\7.0.400\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart() [C:\Repos\sample-api\sample-api.csproj]
0 个警告
31 个错误
Same exact issue. Had to revert to use SDK 7.0.203 to build.
@jaredpar there's some kind of analyzer runtime crash here, should this go to y'all or to the runtime?
@baronfel this should go to runtime first.
@AlexGoris-KasparSolutions and @alva-lin can y'all capture a dump and share it of the crashing process?
cc @mangod9
Same here with 7.0.401. I can build inside VS 2022 17.7.4, but not with 'dotnet build'.
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : Fatal error. Internal CLR error. (0x80131506) [C:\tmp\c\c.csp
roj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.NetCore.Analyzers.InteropServices.PlatformCom
patibilityAnalyzer+<>c__DisplayClass34_0.<AnalyzeOperationBlock>b__1(Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext) [C:\tmp\c\c.cs
proj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor+<>c
__54`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].<ExecuteBlockActions>b__54_1(Syst
em.ValueTuple`2<System.Action`1<Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAn
alysisContext>) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.Exe
cuteAndCatchIfThrows_NoLock[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7be
a7798e],[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=3
1bf3856ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.Dia
gnosticAnalyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueT
uple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.Analysi
sContextInfo>, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.Exe
cuteAndCatchIfThrows[[System.ValueTuple`2[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]
,[Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856
ad364e35]], System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.Diagnostics.Diagnostic
Analyzer, System.Action`1<System.ValueTuple`2<System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>>, System.ValueTuple`2<
System.__Canon,Microsoft.CodeAnalysis.Diagnostics.OperationBlockAnalysisContext>, System.Nullable`1<Microsoft.CodeAnalysis.Diagnostics.AnalysisContex
tInfo>, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.Exe
cuteBlockActions[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](Microsoft.CodeAnalysis.
PooledObjects.PooledHashSet`1<System.__Canon>, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, Microsoft.CodeAnalysis.Diagnostics.
DiagnosticAnalyzer, Microsoft.CodeAnalysis.SemanticModel, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Ac
tion`1<Microsoft.CodeAnalysis.Diagnostic>, System.Func`3<Microsoft.CodeAnalysis.Diagnostic,System.Threading.CancellationToken,Boolean>, System.Nullab
le`1<Microsoft.CodeAnalysis.Text.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerExecutor.Exe
cuteBlockActionsCore[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, Sys
tem.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Cul
ture=neutral, PublicKeyToken=7cec85d7bea7798e],[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7
798e],[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.Collections.Generic.IEnumerab
le`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, System.Collections.Generic.IEnumerable`1<System.__Canon>, Microsoft.C
odeAnalysis.Diagnostics.DiagnosticAnalyzer, Microsoft.CodeAnalysis.SyntaxNode, Microsoft.CodeAnalysis.ISymbol, System.Collections.Immutable.Immutable
Array`1<System.__Canon>, System.Func`2<System.Collections.Immutable.ImmutableArray`1<System.__Canon>,System.Collections.Generic.IEnumerable`1<System.
__Canon>>, Microsoft.CodeAnalysis.SemanticModel, System.Func`2<Microsoft.CodeAnalysis.SyntaxNode,Int32>, System.Nullable`1<Microsoft.CodeAnalysis.Tex
t.TextSpan>, Boolean, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c
__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf385
6ad364e35]].<ExecuteDeclaringReferenceActions>g__executeOperationsBlockActions|6(System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis
.IOperation>, System.Collections.Immutable.ImmutableArray`1<Microsoft.CodeAnalysis.IOperation>, System.Collections.Generic.IEnumerable`1<ExecutableCo
deBlockAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>>) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1+<>c
__DisplayClass11_0[[Microsoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf385
6ad364e35]].<ExecuteDeclaringReferenceActions>g__executeExecutableCodeActions|2() [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Mi
crosoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDec
laringReferenceActions(Microsoft.CodeAnalysis.SyntaxReference, Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnaly
sis.Diagnostics.AnalysisScope, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp.SyntaxKind>, GroupedAnalyzerActions<Microsoft.CodeAnalysis.CSharp
.SyntaxKind>, Boolean, Boolean, Boolean, Boolean, Boolean, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver`1[[Mi
crosoft.CodeAnalysis.CSharp.SyntaxKind, Microsoft.CodeAnalysis.CSharp, Version=4.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].ExecuteDec
laringReferenceActions(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, Boolean,
IGroupedAnalyzerActions, System.Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryP
rocessSymbolDeclaredAsync>d__137.MoveNext() [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.
Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessSymbolDeclaredAsync>d__137, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neut
ral, PublicKeyToken=31bf3856ad364e35]](<TryProcessSymbolDeclaredAsync>d__137 ByRef) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryPr
ocessSymbolDeclaredAsync(Microsoft.CodeAnalysis.Diagnostics.SymbolDeclaredCompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.
Threading.CancellationToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryP
rocessEventCoreAsync>d__136.MoveNext() [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.
Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<TryProcessEventCoreAsync>d__136, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35]](<TryProcessEventCoreAsync>d__136 ByRef) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.TryPr
ocessEventCoreAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.Cancellat
ionToken) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<Proc
essEventAsync>d__134.MoveNext() [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncMethodBuilderCore.
Start[[Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<ProcessEventAsync>d__134, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicK
eyToken=31bf3856ad364e35]](<ProcessEventAsync>d__134 ByRef) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver.Proce
ssEventAsync(Microsoft.CodeAnalysis.Diagnostics.CompilationEvent, Microsoft.CodeAnalysis.Diagnostics.AnalysisScope, System.Threading.CancellationToke
n) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at Microsoft.CodeAnalysis.Diagnostics.AnalyzerDriver+<Proc
essCompilationEventsCoreAsync>d__133.MoveNext() [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ExecutionContext.RunFromThreadPoolDisp
atchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`
1+AsyncStateMachineBox`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e],[Microsoft.CodeA
nalysis.Diagnostics.AnalyzerDriver+<ProcessCompilationEventsCoreAsync>d__133, Microsoft.CodeAnalysis, Version=4.7.0.0, Culture=neutral, PublicKeyToke
n=31bf3856ad364e35]].MoveNext(System.Threading.Thread) [C:\tmp\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch() [C:\tmp
\c\c.csproj]
C:\Program Files\dotnet\sdk\7.0.401\Roslyn\Microsoft.CSharp.Core.targets(80,5): error : at System.Threading.PortableThreadPool+WorkerThread.Worker
ThreadStart() [C:\tmp\c\c.csproj]
I had the same issue. But when I installed the .NET 8.0 SDK v8.0.100-rc.1 the problem was solved for me.
We ran into a similar issue with one of our applications that suddenly stopped building on our build server until we reverted to the older SDK.
I've included the dump of the crashed process dotnet.exe.1100.dmp.zip
Thanks @MatthiasVW.
If you have control of the environment, I wonder if disabling W^X would resolve this issue (as a short term mitigation).
DOTNET_EnableWriteXorExecute=0
@mangod9 can we take a look at this issue, see the stack below.
(44c.242c): Access violation - code c0000005 (first/second chance not available)
For analysis of this file, run !analyze -v
coreclr!FixupPrecode::Init+0xf [inlined in coreclr!MethodTableBuilder::SetupMethodTable2+0xe5e]:
00007ffe`b9a9c21e 488938 mov qword ptr [rax],rdi ds:00007ffe`5c4da000=????????????????
0:025> k
# Child-SP RetAddr Call Site
00 (Inline Function) --------`-------- coreclr!FixupPrecode::Init+0xf [D:\a\_work\1\s\src\coreclr\vm\precode.cpp @ 676]
01 (Inline Function) --------`-------- coreclr!Precode::Init+0x9c [D:\a\_work\1\s\src\coreclr\vm\precode.cpp @ 284]
02 (Inline Function) --------`-------- coreclr!Precode::AllocateTemporaryEntryPoints+0x6e3 [D:\a\_work\1\s\src\coreclr\vm\precode.cpp @ 482]
03 (Inline Function) --------`-------- coreclr!MethodDescChunk::CreateTemporaryEntryPoints+0x6e3 [D:\a\_work\1\s\src\coreclr\vm\method.cpp @ 2940]
04 (Inline Function) --------`-------- coreclr!MethodDescChunk::EnsureTemporaryEntryPointsCreated+0x6e3 [D:\a\_work\1\s\src\coreclr\vm\method.hpp @ 2209]
05 0000005b`1052f860 00007ffe`b9ae1f43 coreclr!MethodTableBuilder::SetupMethodTable2+0xe5e [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 10672]
06 0000005b`1052fd90 00007ffe`b9adc761 coreclr!MethodTableBuilder::BuildMethodTableThrowing+0x1e73 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 1776]
07 0000005b`10530350 00007ffe`b9b46fed coreclr!ClassLoader::CreateTypeHandleForTypeDefThrowing+0x761 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 12431]
08 0000005b`10530780 00007ffe`b9b47f7f coreclr!ClassLoader::CreateTypeHandleForTypeKey+0x195 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2943]
09 (Inline Function) --------`-------- coreclr!ClassLoader::DoIncrementalLoad+0x47 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2883]
0a 0000005b`10530860 00007ffe`b9b4744b coreclr!ClassLoader::LoadTypeHandleForTypeKey_Body+0x50f [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3559]
0b 0000005b`10531620 00007ffe`b9abc62d coreclr!ClassLoader::LoadTypeHandleForTypeKey+0xdb [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3278]
0c 0000005b`105316b0 00007ffe`b9abca68 coreclr!ClassLoader::LoadTypeDefThrowing+0x1dd [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2258]
0d 0000005b`105317e0 00007ffe`b9abaf19 coreclr!ClassLoader::LoadTypeDefOrRefThrowing+0x388 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2428]
0e 0000005b`105318e0 00007ffe`b9adc313 coreclr!ClassLoader::LoadApproxTypeThrowing+0x1a9 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2755]
0f (Inline Function) --------`-------- coreclr!ClassLoader::LoadApproxParentThrowing+0x8e [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2828]
10 0000005b`10531990 00007ffe`b9b46fed coreclr!ClassLoader::CreateTypeHandleForTypeDefThrowing+0x313 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 12159]
11 0000005b`10531dc0 00007ffe`b9b47f7f coreclr!ClassLoader::CreateTypeHandleForTypeKey+0x195 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2943]
12 (Inline Function) --------`-------- coreclr!ClassLoader::DoIncrementalLoad+0x47 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2883]
13 0000005b`10531ea0 00007ffe`b9b4744b coreclr!ClassLoader::LoadTypeHandleForTypeKey_Body+0x50f [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3559]
14 0000005b`10532c60 00007ffe`b9abc62d coreclr!ClassLoader::LoadTypeHandleForTypeKey+0xdb [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3278]
15 0000005b`10532cf0 00007ffe`b9abca68 coreclr!ClassLoader::LoadTypeDefThrowing+0x1dd [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2258]
16 0000005b`10532e20 00007ffe`b9abaf19 coreclr!ClassLoader::LoadTypeDefOrRefThrowing+0x388 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2428]
17 0000005b`10532f20 00007ffe`b9adc313 coreclr!ClassLoader::LoadApproxTypeThrowing+0x1a9 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2755]
18 (Inline Function) --------`-------- coreclr!ClassLoader::LoadApproxParentThrowing+0x8e [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2828]
19 0000005b`10532fd0 00007ffe`b9b46fed coreclr!ClassLoader::CreateTypeHandleForTypeDefThrowing+0x313 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 12159]
1a 0000005b`10533400 00007ffe`b9b47f7f coreclr!ClassLoader::CreateTypeHandleForTypeKey+0x195 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2943]
1b (Inline Function) --------`-------- coreclr!ClassLoader::DoIncrementalLoad+0x47 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2883]
1c 0000005b`105334e0 00007ffe`b9b4744b coreclr!ClassLoader::LoadTypeHandleForTypeKey_Body+0x50f [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3559]
1d 0000005b`105342a0 00007ffe`b9abc62d coreclr!ClassLoader::LoadTypeHandleForTypeKey+0xdb [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3278]
1e 0000005b`10534330 00007ffe`b9abca68 coreclr!ClassLoader::LoadTypeDefThrowing+0x1dd [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2258]
1f 0000005b`10534460 00007ffe`b9abaf19 coreclr!ClassLoader::LoadTypeDefOrRefThrowing+0x388 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2428]
20 0000005b`10534560 00007ffe`b9adc313 coreclr!ClassLoader::LoadApproxTypeThrowing+0x1a9 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2755]
21 (Inline Function) --------`-------- coreclr!ClassLoader::LoadApproxParentThrowing+0x8e [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2828]
22 0000005b`10534610 00007ffe`b9b46fed coreclr!ClassLoader::CreateTypeHandleForTypeDefThrowing+0x313 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 12159]
23 0000005b`10534a40 00007ffe`b9b47f7f coreclr!ClassLoader::CreateTypeHandleForTypeKey+0x195 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2943]
24 (Inline Function) --------`-------- coreclr!ClassLoader::DoIncrementalLoad+0x47 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2883]
25 0000005b`10534b20 00007ffe`b9b4744b coreclr!ClassLoader::LoadTypeHandleForTypeKey_Body+0x50f [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3559]
26 0000005b`105358e0 00007ffe`b9abc62d coreclr!ClassLoader::LoadTypeHandleForTypeKey+0xdb [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3278]
27 0000005b`10535970 00007ffe`b9abca68 coreclr!ClassLoader::LoadTypeDefThrowing+0x1dd [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2258]
28 0000005b`10535aa0 00007ffe`b9abadd4 coreclr!ClassLoader::LoadTypeDefOrRefThrowing+0x388 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2428]
29 0000005b`10535ba0 00007ffe`b9adc313 coreclr!ClassLoader::LoadApproxTypeThrowing+0x64 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2782]
2a (Inline Function) --------`-------- coreclr!ClassLoader::LoadApproxParentThrowing+0x8e [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2828]
2b 0000005b`10535c50 00007ffe`b9b46fed coreclr!ClassLoader::CreateTypeHandleForTypeDefThrowing+0x313 [D:\a\_work\1\s\src\coreclr\vm\methodtablebuilder.cpp @ 12159]
2c 0000005b`105380b0 00007ffe`b9b47f7f coreclr!ClassLoader::CreateTypeHandleForTypeKey+0x195 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2943]
2d (Inline Function) --------`-------- coreclr!ClassLoader::DoIncrementalLoad+0x47 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2883]
2e 0000005b`10538190 00007ffe`b9b4744b coreclr!ClassLoader::LoadTypeHandleForTypeKey_Body+0x50f [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3559]
2f 0000005b`10538f50 00007ffe`b9abc62d coreclr!ClassLoader::LoadTypeHandleForTypeKey+0xdb [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 3278]
30 0000005b`10538fe0 00007ffe`b9abca68 coreclr!ClassLoader::LoadTypeDefThrowing+0x1dd [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2258]
31 0000005b`10539110 00007ffe`b9abeb93 coreclr!ClassLoader::LoadTypeDefOrRefThrowing+0x388 [D:\a\_work\1\s\src\coreclr\vm\clsload.cpp @ 2428]
32 0000005b`10539210 00007ffe`b9abb240 coreclr!SigPointer::GetTypeHandleThrowing+0x1933 [D:\a\_work\1\s\src\coreclr\vm\siginfo.cpp @ 1480]
33 0000005b`10539380 00007ffe`b9b1f855 coreclr!CEEInfo::ConvToJitSig+0x270 [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 476]
34 (Inline Function) --------`-------- coreclr!CEEInfo::getMethodSigInternal+0x4d3 [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 8310]
35 0000005b`10539420 00007ffe`bf6ab380 coreclr!CEEInfo::getCallInfo+0x28c5 [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 5348]
36 (Inline Function) --------`-------- clrjit!Compiler::eeGetCallInfo+0x4b [D:\a\_work\1\s\src\coreclr\jit\ee_il_dll.hpp @ 36]
37 0000005b`10539c90 00007ffe`bf6481c7 clrjit!Compiler::impImportBlockCode+0x2850 [D:\a\_work\1\s\src\coreclr\jit\importer.cpp @ 15297]
38 0000005b`1053a430 00007ffe`bf647dd6 clrjit!Compiler::impImportBlock+0xb7 [D:\a\_work\1\s\src\coreclr\jit\importer.cpp @ 18532]
39 0000005b`1053a580 00007ffe`bf64997e clrjit!Compiler::impImport+0x416 [D:\a\_work\1\s\src\coreclr\jit\importer.cpp @ 19540]
3a 0000005b`1053a5f0 00007ffe`bf697a13 clrjit!Compiler::fgImport+0xe [D:\a\_work\1\s\src\coreclr\jit\flowgraph.cpp @ 615]
3b (Inline Function) --------`-------- clrjit!Phase::Run+0x1b [D:\a\_work\1\s\src\coreclr\jit\phase.cpp @ 61]
3c (Inline Function) --------`-------- clrjit!DoPhase+0x4a [D:\a\_work\1\s\src\coreclr\jit\phase.h @ 136]
3d 0000005b`1053a620 00007ffe`bf6a6492 clrjit!Compiler::compCompile+0x163 [D:\a\_work\1\s\src\coreclr\jit\compiler.cpp @ 4374]
3e 0000005b`1053ae00 00007ffe`bf6a7152 clrjit!Compiler::compCompileHelper+0x9d2 [D:\a\_work\1\s\src\coreclr\jit\compiler.cpp @ 6767]
3f 0000005b`1053aee0 00007ffe`bf6475b5 clrjit!Compiler::compCompile+0x532 [D:\a\_work\1\s\src\coreclr\jit\compiler.cpp @ 5930]
40 0000005b`1053afa0 00007ffe`bf6c6743 clrjit!jitNativeCode+0x265 [D:\a\_work\1\s\src\coreclr\jit\compiler.cpp @ 7413]
41 0000005b`1053b140 00007ffe`b9af8675 clrjit!CILJit::compileMethod+0x83 [D:\a\_work\1\s\src\coreclr\jit\ee_il_dll.cpp @ 264]
42 (Inline Function) --------`-------- coreclr!invokeCompileMethodHelper+0x7e [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 12331]
43 (Inline Function) --------`-------- coreclr!invokeCompileMethod+0xb3 [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 12394]
44 0000005b`1053b1b0 00007ffe`b9af7d45 coreclr!UnsafeJitFunction+0x785 [D:\a\_work\1\s\src\coreclr\vm\jitinterface.cpp @ 12867]
45 0000005b`1053b690 00007ffe`b9af7ab2 coreclr!MethodDesc::JitCompileCodeLocked+0x209 [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 952]
46 0000005b`1053b860 00007ffe`b9af783c coreclr!MethodDesc::JitCompileCodeLockedEventWrapper+0xbe [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 823]
47 0000005b`1053b9c0 00007ffe`b9af736b coreclr!MethodDesc::JitCompileCode+0x2ac [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 763]
48 0000005b`1053ba70 00007ffe`b9af67b6 coreclr!MethodDesc::PrepareILBasedCode+0x6f [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 434]
49 (Inline Function) --------`-------- coreclr!MethodDesc::PrepareCode+0x12 [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 323]
4a 0000005b`1053bac0 00007ffe`b9a8a684 coreclr!MethodDesc::PrepareInitialCode+0x4e [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 314]
4b 0000005b`1053bb50 00007ffe`b9a8a29b coreclr!MethodDesc::DoPrestub+0x2b4 [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 2150]
4c 0000005b`1053bc70 00007ffe`b9bd11c5 coreclr!PreStubWorker+0x21b [D:\a\_work\1\s\src\coreclr\vm\prestub.cpp @ 1938]
4d 0000005b`1053be10 00007ffe`bca35917 coreclr!ThePreStub+0x55
4e 0000005b`1053bec0 000001b7`6722c3d8 Microsoft_CodeAnalysis+0x2d5917
4f 0000005b`1053bec8 0000005b`1053bee8 0x000001b7`6722c3d8
50 0000005b`1053bed0 000001b7`73f9c2b0 0x0000005b`1053bee8
51 0000005b`1053bed8 000001b7`7d3f1908 0x000001b7`73f9c2b0
52 0000005b`1053bee0 00000000`00000012 0x000001b7`7d3f1908
53 0000005b`1053bee8 000001b7`5bea5a08 0x12
54 0000005b`1053bef0 000001b7`5e9178a8 0x000001b7`5bea5a08
55 0000005b`1053bef8 000001b7`5e916c40 0x000001b7`5e9178a8
56 0000005b`1053bf00 000001b7`6551a8d8 0x000001b7`5e916c40
57 0000005b`1053bf08 000001b7`6551ab20 0x000001b7`6551a8d8
58 0000005b`1053bf10 000001b7`62605448 0x000001b7`6551ab20
59 0000005b`1053bf18 00000000`00000000 0x000001b7`62605448
@janvorli, is this perhaps related to this: https://github.com/dotnet/runtime/pull/89899 ? The stack looks different though.
It seems it might be the same thing as #81108 - too many memory mappings causing OOM. I'll take a look at the dump.
@MatthiasVW the dump you've shared seems to be broken. It is only about 6MB long (after unzipping) which isn't a realistic dump size. And when I try to load symbols for modules in it, the dotnet-symbol tool complains that it is unable to read data at certain offset in the file.
Try this one dotnet.zip
@nesherhh thank you for the dump. While it is hard to be sure since some key locals were optimized out, I think it is actually the #81103. We had a PR for porting the fix to .NET 7, but since we were ever hitting it only in local testing under special conditions, in the end we have decided to not to port it just a couple of days ago. I can revive the porting PR.
The #81108 that I've originally suspected is not the cause here, as the dump that @nesherhh shared is from Windows and that issue was specific to Unix.
I've found one more indication in the log that confirmed that it is really the #81103. I've reopened the porting request for .NET 7.
@nesherhh, I'm just curious, do you happen to have some DOTNET_xxx env variables set when you've reproed the issue?
DOTNET_Environment = Development DOTNET_SUGGEST_SCRIPT_VERSION = 1.0.2 DOTNET_TieredCompilation = 0
Is there a reason to disable TieredCompilation? Enabling it might be a workaround in the interim. Thx!
@jeffschwMSFT I tried DOTNET_EnableWriteXorExecute=0 but it had no effect
@janvorli THe dump was one generated by a windows policy and indeed looks cut short, using DOTNET_DbgEnableMiniDump it looks more like the one by nesherhh I can upload that one as well if it helps.
Is there a reason to disable TieredCompilation? Enabling it might be a workaround in the interim. Thx!
I only set DOTNET_Environment=Development in Windows settings. Setting DOTNET_TieredCompilation = 1 seems to fix the issue. I have no Idea why and where it is disabled. Also COMPlus_TieredCompilation = 0
Is there a reason to disable TieredCompilation? Enabling it might be a workaround in the interim. Thx!
I only set DOTNET_Environment=Development in Windows settings. Setting DOTNET_TieredCompilation = 1 seems to fix the issue. I have no Idea why and where it is disabled. Also COMPlus_TieredCompilation = 0
we didn't have DOTNET_TieredCompilation set at all, but enabling it has fixed the issue. Thx.
Hello !
I have the same problem as described here, but for some reason something is setting DOTNET_TieredCompilation to 0 when loading a powershell, but it's not in our environment variables at all, nor in the user profile. So something external is somehow injecting it. Do you have an idea about what it could be ?
@yannou38 just a double check - neither DOTNET_TieredCompilation nor COMPlus_TieredCompilation is being set? These are equivalent, the latter is just an older form.
It's actually the inverse. Both are being forcefully set to 0, but i don't know how (it's not the env vars, nor the profile). Just wanted to check if anyone had some inkling about it or if there's a mechanism from dotnet i'm unaware of.
So, if I understand it correctly, if you try to print the env var from powershell command line (echo $env:COMPlus_TieredCompilation), it doesn't print anything, but if you try to get it from your c# code, you can see it set?
No, what I mean is that when I open a console and print the env variables (with dir env:) those variables are set to 0. And I don't know what is setting those to 0, as all my searches (windows env, registry, profile...) lead to nothing.
@yannou38 have you checked all the powershell profiles? There are four of them according to the https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_profiles?view=powershell-7.3.
Also, to see if it came from the powershell or not, you could try to open a plain old cmd and see if the env vars show the same there.
No powershell profile exists, and repeated searched in the whole system did not lead to anything. Trying to set them to 1 in environment variables did not work as they were overwritten to 0 afterward during loading.
I found a workaround by creating a profile file matching $profile.AllUsersCurrentHost and force-setting DOTNET_TieredCompilation to 1, which seem to be loaded after the offender and fixing the issue. where it come from is still truly a mystery, but it's happening while loading between the env var loading and the profile loading, it seems.
Yes, also have the same problem with DOTNET_TieredCompilation being set to 0. Solution:
rm ENV:DOTNET_TieredCompilation rm ENV:COMPlus_TieredCompilation
at the start of $PROFILE
I have the same issue with 7.0.400 SDK.
@nesherhh answer did work.
The other solution we found is to uncheck 'Run .NET analyzers to help with API usage' in the project.
Run .NET analyzers to help with API usage
Thanks, this resolved it for me.
I'm using 7.0.402
Using 7.0.401. Commands like dotnet pack
work after a reboot but then at some point in powershell I start getting the "Fatal error. Internal CLR error. (0x80131506)" problem.
So far, verifying that the two environment vars exist and then deleting them seems to make the problem go away, at least for a while?
dir ENV:DOTNET_TieredCompilation
dir ENV:COMPlus_TieredCompilation
rm ENV:DOTNET_TieredCompilation
rm ENV:COMPlus_TieredCompilation
As discussed in the attached issue here: https://github.com/dotnet/runtime/issues/93325#issuecomment-1759786609, this seems to be related to SentinalOne disabling TieredCompilation for some reason. @janvorli can confirm but the issue should be fixed in the next servicing release.
Also using SentinelOne here, so this checks out. Reading these comments I gather that the SDK should be able to work correctly in this situation, but I'm wondering whether there are other downsides to having DOTNET_TieredCompilation
set to 0?
Also using SentinelOne and experienced this issue
'm wondering whether there are other downsides to having
DOTNET_TieredCompilation
set to 0?
Yes, the downside is a worse performance of .NET. Disabling tiered compilation means that .NET won't re-JIT frequently executed methods with better optimizations.
Also SentinelOne
the issue should be fixed in the next servicing release.
Yes, the porting PR to 7.0 was merged in (https://github.com/dotnet/runtime/pull/81607), so it should be in the next servicing release.
Closing - it was fixed in 7.0.x servicing as stated above.
Describe the bug
After installing .NET SDK 7.0.400 (same problem with 7.0.307) I can't build any projects anymore. 7.0.203 is working fine. I can reproduce the problem on a clean
dotnet new console
project,To Reproduce
dotnet new console
dotnet build
Exceptions (if any)
Running the build with detailed verbository, reveals the following:
Indicating that a service is not responding in an expected fashion.
Looking through the windows event log, I can see this Application error event (id 1000) each time I try to run a build:
Further technical details
dotnet --info
:Runtime Environment: OS Name: Windows OS Version: 10.0.22621 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\7.0.307\
Host: Version: 7.0.10 Architecture: x64 Commit: a6dbb800a4
.NET SDKs installed: 5.0.408 [C:\Program Files\dotnet\sdk] 6.0.413 [C:\Program Files\dotnet\sdk] 7.0.203 [C:\Program Files\dotnet\sdk] 7.0.307 [C:\Program Files\dotnet\sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.21 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 7.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found: None
Environment variables: Not set
global.json file: Not found
Learn more: https://aka.ms/dotnet/info
Download .NET: https://aka.ms/dotnet/download