dotnet / project-system

The .NET Project System for Visual Studio
MIT License
968 stars 387 forks source link

Opening a web application sometimes displays a "The project system has encountered an error" #1103

Closed davkean closed 7 years ago

davkean commented 7 years ago

Build: 26107.1.d15prel

I ran into this sometimes when opening a web application:

---------------------------
Microsoft Visual Studio
---------------------------
The project system has encountered an error.

Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.

A diagnostic log has been written to the following location: "C:\Users\davkean\AppData\Local\Temp\VsProjectFault_12bec44c-f230-4c32-8667-b0ff882c0c4b.failure.txt".

---------------------------
OK   
---------------------------

Stack:

=====================
1/9/2017 10:46:56 AM
Crippling
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================
1/9/2017 10:46:57 AM
Crippling
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'EditAndContinue'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'EditAndContinue'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================
1/9/2017 10:46:57 AM
Crippling
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================
1/9/2017 10:46:57 AM
Crippling
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'DotNetCoreWeb'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================
1/9/2017 10:46:57 AM
Crippling
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'EditAndContinue'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.  Potential capabilties involved: 'EditAndContinue'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.CapabilityScopeRequirementState.<>c__DisplayClass8_0.<<InitialProjectReload>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.VisualStudio.ProjectSystem.CommonProjectSystemTools.Rethrow(Exception ex)
   at Microsoft.VisualStudio.ProjectSystem.ProjectErrorReporting.<>c__DisplayClass6_0.<SubmitErrorReport>b__0()
   at Microsoft.VisualStudio.ProjectSystem.ExceptionFilter.<>c__DisplayClass2_0.<Guard>b__0()
   at GuardMethodClass.GuardMethod(Func`1 , Func`2 , Func`2 )<---

===================
attilah commented 7 years ago

The same happened to me with build: 26109.0.d15rel. Previous RCs worked well.

Repro:

  1. https://github.com/dotnet/orleans
  2. Open vNext\src\Orleans.vNext.sln
attilah commented 7 years ago

If I removed the <ProjectCapability Include="EditAndContinue"/> from "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\Managed"\Microsoft.Managed.DesignTime.targets then the exception is not happening.

333fred commented 7 years ago

Fixed in #1141.

davkean commented 7 years ago

This is one is tracking DotNetWeb whcih isn't fixed. The EditAndContinue issue was fixed.

srivatsn commented 7 years ago

This issue was moved to aspnet/Tooling#942

srivatsn commented 7 years ago

Moving to the web repo since the remaining issue is to fix this for dotnetweb.