Skip to content

Critical capabilities changes were detected without any change made to the project #3673

Open

Description

@davkean

From @vsfeedback on June 16, 2018 15:5

  1. git clone https://github.com/dotnet/docfx.git
  2. open the All.sln
  3. error: The project system has encountered an error.

Internal error: Critical capabilities changes were detected without any change made to the project 'Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.Tests.fsproj', and forces the project to be reloaded. Potential capabilities involved: 'FSharp'.

I meet this error after upgrading to vs 15.7.3. I found several issues with similar error message that have been fixed in 15.3, but I think it's not the same issue for me.

Details:

LimitedFunctionality
System.AggregateException: One or more errors occurred. ---> System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project 'Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.fsproj', and forces the project to be reloaded.  Potential capabilities involved: 'FSharp'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.<RequestReloadForIncompatibleCapabilitiesAsync>d__20.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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
   --- 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 'Microsoft.DocAsCode.Metadata.ManagedReference.FSharp.fsproj', and forces the project to be reloaded.  Potential capabilities involved: 'FSharp'.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.<RequestReloadForIncompatibleCapabilitiesAsync>d__20.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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

This issue has been moved from https://developercommunity.visualstudio.com/content/problem/267201/critical-capabilities-changes-were-detected-withou-1.html
VSTS ticketId: 626735

These are the original issue comments:
(no comments)
These are the original issue solutions:
(no solutions)

Copied from original issue: dotnet/fsharp#5205

Activity

  1. added
    Area-External
    on Jun 27, 2018
  2. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    From @cartermp on June 16, 2018 15:6

    This might need to go under dotnet/project-system

  3. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    From @cartermp on June 18, 2018 17:28

    @TIHan FYI

  4. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor
  5. removed
    Area-External
    on Jun 27, 2018
  6. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    I can repro 100% on 15.7, cannot repro on 15.8.

  7. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    Okay I know the cause, these projects aren't real F# projects. They are C# projects that someone has renamed to fsproj. When loading, they start off as "CSharp" due the C# factory in the solution, and only latter when we evaluate the project does the "FSharp" capability arrive from targets files. We have F# components that must be loaded during startup, hence critical capability, - so CPS faults.

    The fix is for someone to File -> New F# project and add it manually to the solution. The solution is currently telling VS that the project should be loaded using "C#" project system.

    I'll leave this bug open, as I'd like for us to handle this situation better - it's kind odd/powerful that we don't care about the extension of the project at all when determining the default set of capabilities.

  8. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    tag @superyyrrzz on this version.

  9. davkean commented on Jun 27, 2018

    @davkean
    MemberAuthor

    I thinking maybe we should just Veto the load if the expected "default" capabilities aren't present (but we need at least one?) via IVetoProjectPreLoad or always force default capabilities based on extension.

  10. added this to the 16.0 milestone on Jun 27, 2018
  11. superyyrrzz commented on Jun 27, 2018

    @superyyrrzz

    @davkean Thank you for the information! I will try the fix.

  12. modified the milestones: 16.0, 16.X on Feb 13, 2019
  13. added
    Triage-Approved
    on Mar 13, 2019
  14. added this to the Backlog milestone on Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Triage-Approved

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions