dotnet / project-system

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

Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded #2103

Closed davidfowl closed 7 years ago

davidfowl commented 7 years ago

It's not consistent but I get this error sometimes when opening KestrelHttpServer.sln at https://github.com/aspnet/KestrelHttpServer.

---------------------------
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: 'DynamicDependentFile'.

A diagnostic log has been written to the following location: "C:\Users\dfowler\AppData\Local\Temp\VsProjectFault_fdeb45df-f3c9-4c48-b89b-bfaaccfb8c79.failure.txt".

---------------------------
OK   
---------------------------
=====================
5/1/17 11:56:06 PM
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: 'DynamicDependentFile'.
   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 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, and forces the project to be reloaded.  Potential capabilties involved: 'DynamicDependentFile'.
   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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

===================
davkean commented 7 years ago

@BillHiebert This looks like something you are defining - DynamicDependentFile. We don't yet support this.

davkean commented 7 years ago

A quick look around the tree and I can't see the component that this is causing this @lifengl?

lifengl commented 7 years ago

I think the tree might be initialized earlier when other auto load components wait it very early during loading the project, and the project tree code doesn't always handle the dynamic dependence capability to change. Both of them are addressed in 15.3, but we don't have a repro before, so the fix was done based on code inspection.

Sent from my phone

On May 2, 2017, at 12:48 AM, David Kean notifications@github.com<mailto:notifications@github.com> wrote:

A quick look around the tree and I can't see the component that this is causing this @lifenglhttps://github.com/lifengl?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/project-system/issues/2103#issuecomment-298534227, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALGWwrdtYDGCQWeIR672iHDbH0RLkF7Kks5r1t_DgaJpZM4NNxsH.

srivatsn commented 7 years ago

@jmarolf can you try opening the kestrel repo with the latest bits to see if this reproes?

jasonmalinowski commented 7 years ago

I hit this dogfooding Roslyn as well. Is there a workaround or suggestion here?

srivatsn commented 7 years ago

@jasonmalinowski are you on 15.3 builds? @lifengl - the fixes you mention above - are they in for Preview1?

jasonmalinowski commented 7 years ago

@srivatsn I'm on 15.3 26502.1-Preview.

lifengl commented 7 years ago

the change is not in the preview 1. I will try the solution provided here with our new bits.

davkean commented 7 years ago

@jasonmalinowski This error can occur for a variety of reasons and components. Can you post the exact error message that you ran into? I'd be surprised if Roslyn ran into exactly the same issues as @davidfowl as this would only occur for web.

jasonmalinowski commented 7 years ago

@davkean:

System.InvalidOperationException: Internal error: Critical capabilities changes were detected without any change made to the project, and forces the project to be reloaded.
   at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet`1 capabilities)
   at Microsoft.VisualStudio.ProjectSystem.UnconfiguredProjectImpl.<Microsoft-VisualStudio-ProjectSystem-IProjectCapabilitiesScopeContext-ReloadIfNecessaryAsync>d__163.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)
davkean commented 7 years ago

More interested in this " Potential capabilties involved: 'DynamicDependentFile'"

DynamicDependentFile is only present in web.

Okay, that doesn't tell us enough info as to the cause - do you have a good repro for this?

jasonmalinowski commented 7 years ago

@davkean: I had switched git branches between a branch that had @jaredpar's change back to one that didn't, and then hit reload on the solution. Or something.

jasonmalinowski commented 7 years ago

(short answer: no I don't really know what I was doing.)

lifengl commented 7 years ago

I didn't see DynamicDependentFile in Jason's error message. Did I miss something?

davkean commented 7 years ago

That was my point; it's likely a different cause.

jasonmalinowski commented 7 years ago

Understood. I'll file a new bug if I see it again and I recall what I was doing.

lifengl commented 7 years ago

I agree... I tried quite some time to reload the solution with our new bits, but didn't see the issue related to DynamicDependentFile. I guess David mentioned that the Roslyn project may have problems in shared projects, which can be completely different problems.

gulbanana commented 7 years ago

I'm hitting this with 15.2. There's a websdk project in the solution, but no shared projects.

davkean commented 7 years ago

@gulbanana Can you paste the exact error?

davidfowl commented 7 years ago

This happens when I change branches with VS open.

davkean commented 7 years ago

@davidfowl Can you tell me if it's exactly the same error? Exactly the same error as the original I believe is fixed in recent builds. However, this error can also be caused by any number of components, so we've made the error a little more explicit in recent builds as well to provide more information.

lifengl commented 7 years ago

I made some changes in CPS, so the error message will contain the name of the project and the capability causing the problem. This would be inserted into 15.3 today. If you can try the new bits tomorrow, it would help us to narrow down what is going on.

Sent from my phone

On May 15, 2017, at 1:33 AM, David Kean notifications@github.com<mailto:notifications@github.com> wrote:

@davidfowlhttps://github.com/davidfowl Can you tell me if it's exactly the same error? Exactly the same error as the original I believe is fixed in recent builds. However, this error can also be caused by any number of components, so we've made the error a little more explicit in recent builds as well to provide more information.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/project-system/issues/2103#issuecomment-301411113, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALGWwpMNFvHoTMKdei_Lnt9dx_MB61v6ks5r6A3XgaJpZM4NNxsH.

gulbanana commented 7 years ago

happened again a few minutes ago on 15.2, i reflexively clicked 'ok' and now can't reproduce it.. :( I did find this error in my appdata\local\temp though:

=====================
17/05/2017 1:30:50 PM
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: 'DynamicDependentFile'.
   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 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, and forces the project to be reloaded.  Potential capabilties involved: 'DynamicDependentFile'.
   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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

===================
davkean commented 7 years ago

@BillHiebert @lifengl Can you work out who owns this? We don't define this capability, so it's not coming from us. @lifengl I heard you mention something about fixing this case, is that correct?

lifengl commented 7 years ago

CPS team owns this capability, and we noticed some code chain which might contribute this failure, and fixed in 15.3 preview 2. But we never had a solid repro, the fix is done based on code review. We still don't have idea on issues possibly in a shared project. @jasonmalinowski : we improved the error message string to contain the project name and the capability in the newest 15.3 build, so if your team can dogfood the new build, it will help us to narrow down this issue, when it happens again.

jasonmalinowski commented 7 years ago

@lifengl: will do, thanks!

lifengl commented 7 years ago

@davkean I think the capability causing trouble inside the shared project is 'CSharp' capability, it was registered in the project factory registry for .csproj, but .shproj uses a single factory for all different languages. I believe that we used to have an unconfigured project level capabilities provider, which matches the csharp target file and add the CSharp capability. I guess somehow this might be removed when we move cs/vb logic to ML, because .Net Core uses new SDK references, and it turns out that .shproj actually depends on that.

lifengl commented 7 years ago

Hmm... I think I am wrong here, We still have a rule to match .CodeSharing.CSharp.Targets for shared project inside CSharp, not moved to the ML side. The CSharp capability issue I saw was coming from a CPS C# testing project in the same solution.

gulbanana commented 7 years ago

I managed to capture the error today.

---------------------------
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: 'DynamicDependentFile'.

A diagnostic log has been written to the following location: "C:\Users\banana\AppData\Local\Temp\VsProjectFault_2f44e297-4bbe-4dd2-b05b-351ba80e61be.failure.txt".

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

Here's the log it mentions:

=====================
19/05/2017 2:21:04 PM
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: 'DynamicDependentFile'.
   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 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, and forces the project to be reloaded.  Potential capabilties involved: 'DynamicDependentFile'.
   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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

===================

Seems identical to the errors above, so I won't dump any more of these on you unless you need em.

osoykan commented 7 years ago

I've got same error while updating nuget packages. VS 2017 is corrupted and needed to restart itself. I can't update nuget references anymore :(

27.05.2017 13:19:59
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: 'DependenciesTree'.
   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 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, and forces the project to be reloaded.  Potential capabilties involved: 'DependenciesTree'.
   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 stack trace from previous location where exception was thrown ---
   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

My Infos:

Microsoft Visual Studio Enterprise 2017 
Version 15.2 (26430.6) Release
VisualStudio.15.Release/15.2.0+26430.6
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Enterprise

Architecture Diagrams and Analysis Tools   00369-90006-39521-AA088
Microsoft Architecture Diagrams and Analysis Tools

Visual Basic 2017   00369-90006-39521-AA088
Microsoft Visual Basic 2017

Visual C# 2017   00369-90006-39521-AA088
Microsoft Visual C# 2017

Visual C++ 2017   00369-90006-39521-AA088
Microsoft Visual C++ 2017

Visual F# 4.1   00369-90006-39521-AA088
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.6.00404.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30503.0
ASP.NET and Web Tools 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50303.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30209.0
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.2.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Common Azure Tools   1.9
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

GitHub.VisualStudio   2.2.0.11
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JetBrains ReSharper Ultimate 2017.1.2    Build 108.0.20170428.75743
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft Azure Hive Query Language Service   2.2.5000.0
Language service for Hive query

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50131.1

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

NCrunch   
Continuous Testing Tool for .NET
Copyright © 2010-2016 Remco Software Ltd

Node.js Tools   1.3.50417.1
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   4.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

OzCode   1.0
Your road to Magical Debugging. http://www.oz-code.com

OzCodePackage Extension   1.0
OzCodePackage Visual Studio Extension Detailed Info

Redgate ReadyRoll   1.14.1.3831
Extend DevOps processes to your SQL Server databases and safely automate database deployments.

Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.

This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation. 
Visual Studio is a registered trademark of Microsoft Corporation. 

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Log4Net http://logging.apache.org/log4net/
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.

Redgate SQL Prompt   7.5.1.1299
Write, format, and refactor SQL effortlessly

SQL Server Data Tools   15.1.61702.140
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   2.2.2.0
TypeScript tools for Visual Studio
srivatsn commented 7 years ago

It looks like we know of these two issues here

There's also:

davkean commented 7 years ago

I repro'd the DependenciesTree case simply by adding the following to a Directory.build.targets:

  <ItemGroup>
    <ProjectCapability Remove="DependenciesTree"/>
  </ItemGroup>

Perhaps the NuGet installation broke imports to the managed.targets? I'm not sure. However, if DependenciesTree cannot be removed dynamically then we should make it a fixed capability.

lifengl commented 7 years ago

We don't know about the DependenciesTree issue. CPS should support dynamic subtree providers, so it is more likely some DependenciesTree related components might cause this. @adrianvmsft, if we a repro, maybe some extra logging will help?

lifengl commented 7 years ago

There could be multiple problems behind this. But I start to think maybe the logic to trigger this NFE itself is no longer correct. Normally, we should allow the project to be reloaded, when some change happened, and invalidate the in-memory project model. The NFE was added to detect that we actually trigger this logic in the middle of loading a project, in which time, we will reload a project endlessly (which happened in JavaScript project in one point), it indicates an internal error, but it is much better to report an NFE and stops there than keeping reloading until VS crashes. However, that logic was added long time ago before we add feature to update project when the project file is changed, or a target file is changed, so it kicks in, when the project file is not dirty. With globs, project files are often not dirty, but targets can be changed when NuGet packages are updated, or during a git branch switching, so maybe this NFE is kicking in in the wrong time (the valid time it happens is during loading a solution, not when we switch GIT branches.)

lifengl commented 7 years ago

I opened bug 449740 in TFS to track that we pop up the NFE when we reload a project or a target file.

srivatsn commented 7 years ago

The bug mentioned above - 449740 has also been fixed. At this point, the known issues have been fixed and CPS has added more data to these events such that if this is caused by some other path, then we can have more data to diagnose. There's a bug on CPS that's tracking this. Closing this issue as a dupe of https://devdiv.visualstudio.com/DevDiv/_workitems?id=430239&triage=false&_a=edit

vdevappa commented 7 years ago

I got this error today with the latest version of VS 2017 Enterprise

===================== 7/13/2017 9:56:44 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: 'DynamicDependentFile'. at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet1 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(Func1 , Func2 , Func2 ) --- 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, and forces the project to be reloaded. Potential capabilties involved: 'DynamicDependentFile'. at Microsoft.VisualStudio.ProjectSystem.ProjectCapabilitiesRequirementsService.RequestReloadForIncompatibleCapabilitiesAsync(IImmutableSet1 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(Func1 , Func2 , Func2 ) --- End of stack trace from previous location where exception was thrown --- at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)<---

===================

davkean commented 7 years ago

@vdevappa By latest, which version? Can you go to Help -> About -> Copy Info and paste the top three lines?

vdevappa commented 7 years ago

Microsoft Visual Studio Enterprise 2017 Version 15.2 (26430.15) Release VisualStudio.15.Release/15.2.0+26430.15 Microsoft .NET Framework Version 4.7.02046 Installed Version: Enterprise

ediganeelima commented 6 years ago

Got the same error on VS 2017 (15.4.5) - All I was trying to do is just trying to call my API from a console application. Below is the code snippet..

public static void Main(string[] args)
{
    ProcessInvoices().Wait();
}

private static async Task ProcessInvoices()
{
    var apiEndPoint = "https://localhost/myApi/Invoices/my-queue?userId=143";
    var client = new HttpClient();
    client.DefaultRequestHeaders.Accept.Clear();
    client.DefaultRequestHeaders.Accept.Add(
        new MediaTypeWithQualityHeaderValue("application/vnd.github.v3+json"));
    client.DefaultRequestHeaders.Add("User-Agent", ".NET Foundation Repository Reporter");

    var stringTask = client.GetStringAsync(apiEndPoint);

    var msg = await stringTask;
}

FYI - Both my console app and my API are in the same solution. And I'm using .Net Core 2.0

Below are the version details.

Microsoft Visual Studio Professional 2017 Version 15.4.5 VisualStudio.15.Release/15.4.5+27004.2010 Microsoft .NET Framework Version 4.6.01586

Installed Version: Professional

Visual Basic 2017 00369-60000-00001-AA214 Microsoft Visual Basic 2017

Visual C# 2017 00369-60000-00001-AA214 Microsoft Visual C# 2017

Application Insights Tools for Visual Studio Package 8.9.00809.2 Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.0.30925.0 ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 1.0 Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2012 4.0.20601.0 For additional information, visit https://www.asp.net/

ASP.NET Web Frameworks and Tools 2017 5.2.50921.0 For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.0.30915.0 Azure App Service Tools v3.0.0

Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JavaScript Language Service 2.0 JavaScript Language Service

Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers

NuGet Package Manager 4.4.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

SQL Server Data Tools 15.1.61707.200 Microsoft SQL Server Data Tools

TypeScript 2.3.5.0 TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Copied the error message below:

System.InvalidOperationException: System.Windows.Documents.Paragraph is not a Visual or Visual3D.
at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D)
at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference)
at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.IsMouseOverTextView(Point position)
at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<<OnModifierKeyStateChanged>b__19_0>d.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task t44ask)
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.<CallExtensionPointAsync>d__29.MoveNext() --- End of stack trace from previous location where exception was thrown ---
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)


Appreciate your help or inputs on this.

Thanks!

davkean commented 6 years ago

@ediganeelima You say you hit the same error, but then pasted the follow stack which is different:

System.InvalidOperationException: System.Windows.Documents.Paragraph is not a Visual or Visual3D. 
at MS.Internal.Media.VisualTreeUtils.AsVisual(DependencyObject element, Visual& visual, Visual3D& visual3D) 
at MS.Internal.Media.VisualTreeUtils.AsNonNullVisual(DependencyObject element, Visual& visual, Visual3D& visual3D) 
at System.Windows.Media.VisualTreeHelper.GetParent(DependencyObject reference) 
at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.IsMouseOverTextView(Point position) 
at Microsoft.VisualStudio.Language.Intellisense.Implementation.GoToDefMouseHandler.<<OnModifierKeyStateChanged>b__19_0>d.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task t44ask) 
at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.<CallExtensionPointAsync>d__29.MoveNext() 
--- End of stack trace from previous location where exception was thrown --- 
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)

Which error did you hit?