Why does the computer have to be rebooted frequently to build a UWP app?

Hong 1,211 Reputation points
2021-01-26T23:48:34.34+00:00

Building a UWP app frequently has problems and rebooting the computer seems to be the only way to remedy it. I have tried to close every application that I can close so that VS is the only app running, but it does not help at all. I wonder if there are some ghost processes that need to be killed. I am wondering if anyone could offer a tip on how to investigate this?

The following is just one type of error that I cannot get rid of without rebooting the computer. I have tried restarting VS many times, cleaning the project, cleaning the solution, deleting bin and obj folders...

>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error :
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachExpression(BoundForEachStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachStatement(BoundForEachStatement node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryBlockWithAnyTransferFunction(BoundStatement tryBlock, BoundTryStatement node, TLocalState& tryState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryStatement(BoundTryStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Analyze(Boolean& badRegion, Optional1 initialState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(Boolean& badRegion, DiagnosticBag diagnostics)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.<Analyze>g__analyze|28_1(Boolean strictAnalysis, <>c__DisplayClass28_0& )
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(CSharpCompilation compilation, MethodSymbol member, BoundNode node, DiagnosticBag diagnostics, Boolean requireOutParamsAssigned)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.FlowAnalysisPass.Rewrite(MethodSymbol method, BoundBlock block, DiagnosticBag diagnostics, Boolean hasTrailingExpression, Boolean originalBodyNested)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass22_0.<CompileNamedTypeAsync>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error :
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachExpression(BoundForEachStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachStatement(BoundForEachStatement node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryBlockWithAnyTransferFunction(BoundStatement tryBlock, BoundTryStatement node, TLocalState& tryState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryStatement(BoundTryStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Analyze(Boolean& badRegion, Optional1 initialState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(Boolean& badRegion, DiagnosticBag diagnostics)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.<Analyze>g__analyze|28_1(Boolean strictAnalysis, <>c__DisplayClass28_0& )
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(CSharpCompilation compilation, MethodSymbol member, BoundNode node, DiagnosticBag diagnostics, Boolean requireOutParamsAssigned)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.FlowAnalysisPass.Rewrite(MethodSymbol method, BoundBlock block, DiagnosticBag diagnostics, Boolean hasTrailingExpression, Boolean originalBodyNested)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass22_0.<CompileNamedTypeAsync>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error :
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachExpression(BoundForEachStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitForEachStatement(BoundForEachStatement node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitUsingStatement(BoundUsingStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryBlockWithAnyTransferFunction(BoundStatement tryBlock, BoundTryStatement node, TLocalState& tryState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitTryStatement(BoundTryStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitStatementsWithLocalFunctions(BoundBlock block) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.VisitBlock(BoundBlock node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitWithStackGuard(BoundNode node)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.VisitAlways(BoundNode node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Scan(Boolean& badRegion)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass2.Analyze(Boolean& badRegion, Optional1 initialState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(Boolean& badRegion, DiagnosticBag diagnostics)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.<Analyze>g__analyze|28_1(Boolean strictAnalysis, <>c__DisplayClass28_0& )
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.DefiniteAssignmentPass.Analyze(CSharpCompilation compilation, MethodSymbol member, BoundNode node, DiagnosticBag diagnostics, Boolean requireOutParamsAssigned)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.FlowAnalysisPass.Rewrite(MethodSymbol method, BoundBlock block, DiagnosticBag diagnostics, Boolean hasTrailingExpression, Boolean originalBodyNested)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(MethodSymbol methodSymbol, Int32 methodOrdinal, ProcessedFieldInitializers& processedInitializers, SynthesizedSubmissionFields previousSubmissionFields, TypeCompilationState compilationState)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(NamedTypeSymbol containingType)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.MethodCompiler.<>c__DisplayClass22_0.<CompileNamedTypeAsync>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Roslyn.Utilities.UICultureUtilities.<>c__DisplayClass5_0.<WithCurrentUICulture>b__0()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.Execute()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at System.Threading.ThreadPoolWorkQueue.Dispatch()
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error :
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error : at Microsoft.CodeAnalysis.CSharp.AbstractFlowPass`2.VisitForEachExpression(BoundForEachStatement node) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): erro

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
40,200 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,421 Reputation points
    2021-01-27T03:04:53.493+00:00

    Hi zipswich,

    Please try these methods to build your project:

    • Using msbuild command tool
      1. Open Developer Command prompt for VS 2019
      2. Type this command: msbuild XXXX.csproj
    • Run visual studio in safe mode
      1. Open Developer Command prompt for VS2019
      2. Type this command: devenv /SafeMode

    If the machine still restarts, please re-install all VS components or even the system.

    Best Regards, Dylan

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our * *documentation* to enable e-mail notifications if you want to receive the related email notification for this thread.**


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.