Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
CodeMaid Handled Exception - IsExternal and GetParentProjectItem #255
Steps to recreate
[CodeMaid Diagnostic 10:53:48 PM] WindowEventListener.OnWindowChange raised for '...\bookController.js'
The following 2 exceptions repeat, typically many times per second:
[CodeMaid Handled Exception 10:53:49 PM] Unable to determine if ProjectItem is external: System.InvalidOperationException: Operation is not valid due to the current state of the object.
If I switch to another window, the exceptions stop
I will try to open the file directly, outside the solution, likely this
On 6 April 2016 at 05:07, Steve Cadwallader firstname.lastname@example.org
added a commit
Apr 7, 2016
Thanks for the extra details, especially that you were using a Node.JS/Express solution. I have now reproduced the repeated warning messages, but not the hang.
NTVS (Node.JS Tools for Visual Studio) does not implement part of the VS API the same as other languages.. which results in the error messages being created. See #107 and #175 for some background on the issue we encountered when originally adding support for NTVS. The workaround is that these methods all have fallback behavior and provide the warning.
Since these are "known" exceptions in some scenarios, I have demoted them to only appear when Diagnostics Mode (within CodeMaid->Options) is enabled.
Since I didn't reproduce the hang, I don't know if this will address the issue you are seeing. Would you mind testing the latest CI build at http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/ (10.0.76 or higher) to see if that changes the behavior at all?
If it doesn't address the issue (which wouldn't surprise me), then this would be a similar issue to #227 where the repeated checking of command availability is causing issues.. and I might consider keeping the commands permanently enabled vs. dynamically enabling/disabling them. That would bypass some state checks until on demand vs. on API demand which is triggered pretty frequently.
I've updated to the CI build. No change in behaviour.
There are no exceptions if I don't have a solution loaded. I have repeated
In case it's helpful, I grabbed the diagnostic log when I set focus into
** With solution loaded
Also, here is the full info of what I have installed. Please note that I
Microsoft Visual Studio Enterprise 2015
Installed Version: Enterprise
Architecture and Modeling Tools 00322-90200-03631-AA416
UML® and Unified Modeling Language™ are trademarks or registered trademarks
Visual Basic 2015 00322-90200-03631-AA416
Visual C# 2015 00322-90200-03631-AA416
Visual C++ 2015 00322-90200-03631-AA416
Application Insights Tools for Visual Studio Package 5.2.60328.3
ASP.NET and Web Tools 2015 (RC1 Update 1) 14.1.20203.0
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
ASP.NET Web Frameworks and Tools 2013 5.2.40314.0
Azure App Service Tools v2.9 14.0.20316.0
Azure Data Lake Node 1.0
Azure Data Lake Tools for Visual Studio 2.0.6000.0
Common Azure Tools 1.7
Microsoft Azure Data Factory Node Node 1.0
Microsoft Azure HDInsight HQL Service 2.0.6000.0
Microsoft Azure HDInsight Tools for Visual Studio 2.0.6000.0
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Tools 2.9
Microsoft Azure Tools 2.8
Node.js Tools 1.1.40329.04
Node.js Tools - Profiling 1.1.40329.04
NuGet Package Manager 3.4.1
PreEmptive Analytics Visualizer 1.2
SQL Server Data Tools 14.0.60311.1
Visual Studio Tools for Apache Cordova Update 8
Xamarin 3.11.458.0 (7acdedd)
Xamarin.Android 188.8.131.52 (3518c4ceb984ffea1f5d972ea9c09eb27738d565)
Xamarin.iOS 184.108.40.206 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e)
Xamarin.iOS Unified Migration 1.0
Lastly, find attached my project. It's all internet tuturial code to teach
I left my mercurial repository and .vs directory in there just in case
Please let me know if there's anything I can do to help.
On 6 April 2016 at 18:11, Steve Cadwallader email@example.com
Thanks for the testing and additional details.
I will try disabling logging.
Mercurial stores its repository in the .hg folder in that zip.
On 7 April 2016 at 04:26, Steve Cadwallader firstname.lastname@example.org
referenced this issue
Apr 7, 2016
added a commit
Apr 9, 2016
I've changed several of the commands that have expensive availability checks to remain enabled and defer availability checks to execution time. I think this may resolve the issue you have been seeing. Can you please test the latest CI build (10.0.81 or higher) available here: http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/
That is perfect. Exceptions are gone, also the repeating warnings about
Also, CodeMaid has nothing to do with the hanging I have been. Even with
On 9 April 2016 at 04:53, Steve Cadwallader email@example.com