Open michaelm7456 opened 5 years ago
Thanks for the report. Is the exception consistent or is it thrown randomly?
No problem, for myself and my colleague currently using the tool, this error appears to occur intermittently while using Visual Studio 2019.
I've tested to verify whether the exception appears during a certain time or circumstance, such as starting up Visual Studio, loading a solution, or opening certain files in the 'Solution Explorer', but unfortunately it seems to be intermittent from what we can tell.
Thanks in advance.
@elishalom I have the same problem, but at present, it's just the cs file of the winforms that has problems? There's nothing wrong with the other classes.
Thanks for the update. I don't maintain the extension on a regular basis anymore, so it may take me some time to get to it. But, this issue is the top one I plan to fix.
Thanks for the update. I don't maintain the extension on a regular basis anymore, so it may take me some time to get to it. But, this issue is the top one I plan to fix.
Thank you for bringing us such an excellent extension! We look forward to your update!
Thanks for the update. I don't maintain the extension on a regular basis anymore, so it may take me some time to get to it. But, this issue is the top one I plan to fix.
Thank you for bringing us such an excellent extension! We look forward to your update!
Can you please share the code that causes the error? Even a dummy version that reproduces it will be very helpful. I'm trying to create a repro of the issue but I'm failing to create a code that raises the exception.
Thanks for the update. I don't maintain the extension on a regular basis anymore, so it may take me some time to get to it. But, this issue is the top one I plan to fix.
Thank you for bringing us such an excellent extension! We look forward to your update!
Can you please share the code that causes the error? Even a dummy version that reproduces it will be very helpful. I'm trying to create a repro of the issue but I'm failing to create a code that raises the exception.
I upload my ActivityLog.xml to Firefox Send. Here is https://send.firefox.com/download/de30e1ab028364ea/#fXVNs7c6paqUdYZbggqGSA
And my Visual Studio Version is Visual Studio Enterprise 2019(VisualStudio.16.Release/16.4.4+29728.190)
Thanks for the details. I could not reproduce the exception, but, I think I identified a potential spot that causes the exception. I've updated the extension with a fix to that issue. The version with the change is 0.9.1.1. If one of you install it, can you please update on this thread if the exception is raised again?
Thanks for the details. I could not reproduce the exception, but, I think I identified a potential spot that causes the exception. I've updated the extension with a fix to that issue. The version with the change is 0.9.1.1. If one of you install it, can you please update on this thread if the exception is raised again?
@elishalom The frustration is that the problem still seems to exist.
In the picture, my red arrow points to the file I edited. When I open the CS file corresponding to the form, an error will occur, but opening other classes will not appear.
Details of the extension I installed
Here is the new ActivityLog
https://send.firefox.com/download/b0383d087d78b5ef/#aMWbojoW6lnfrT6M3dp9Kg
Thanks for the details. I could not reproduce the exception, but, I think I identified a potential spot that causes the exception. I've updated the extension with a fix to that issue. The version with the change is 0.9.1.1. If one of you install it, can you please update on this thread if the exception is raised again?
And what I want to add is that Code Metrics will not work in the cs file that the form is bound to. Just like
NOT
Also, it's amazing that in WPF project, the file bound by WinForms is normal, but the WPF file is abnormal. In some WinForms project, the CS file bound by the form is abnormal (Some are normal).
In WPF project:
In WinForms project:
Some may work
Thanks for the detail @KevinZonda. Is it possible for you to share some of the code that causes the exception? I hope that I'll be able to reproduce the issue and track the exception.
Thanks for the detail @KevinZonda. Is it possible for you to share some of the code that causes the exception? I hope that I'll be able to reproduce the issue and track the exception.
I'm not sure how to share such code. I'm just editing a my repository. Here is
https://github.com/KevinZonda/Widget-WPF
In this repository, the xaml.cs will cause the exception, but other cs file will not.
Thanks for the detail @KevinZonda. Is it possible for you to share some of the code that causes the exception? I hope that I'll be able to reproduce the issue and track the exception.
Exception also happens in this file:
https://github.com/elishalom/netcodemetrics/blob/master/CodeMetrics.Adornments/CodeMetricsPackage.cs
Thanks, that reproduces the error. The exception is due to the fact the complexity extension is based on an old version of NRefactory which does not support new features of the language. I'll port it to roslyn to fix it and potentially support new features of the language.
Thanks, that reproduces the error. The exception is due to the fact the complexity extension is based on an old version of NRefactory which does not support new features of the language. I'll port it to roslyn to fix it and potentially support new features of the language.
That sounds fantastic!
Hi,
This issue is still present and quite annoying. In fact it renders the whole extension useless. On top of that, once you get the exception, the extension stops working.
Are there any plans on fixing that soon?
Hi,
This issue is still present and quite annoying. In fact it renders the whole extension useless. On top of that, once you get the exception, the extension stops working.
Are there any plans on fixing that soon?
using roslyn code analysis may help, see more https://github.com/vojtechkacmarik/netcodemetrics and #1
using roslyn code analysis may help, see more https://github.com/vojtechkacmarik/netcodemetrics and #1
Thank you but this extension is not installing on latest VS 2019 16.7 Downloaded from Marketplace and attempting to install results in https://prnt.sc/txp3a7 If installation is attempted within VS, result is https://prnt.sc/txp4lj
Hi guys,
I've raised a Pull Request here on the 'vojtechkacmarik' fork of the original Repo, which means the Extension (with the Roslyn changes) will now work with Visual Studio 2019 once this PR is merged.
The good news is I've got the Roslyn version of the Extension installed successfully after building it locally with the PR changes for updating the VSIX manifest.
The Roslyn version also seems to be able to handle calculations involving Expression Body syntax, where the original Code Metrices Extension I think still has issues with this.
[Screenshot of 'Expression Body' Code samples with Roslyn Code Metrics Tool installed]
Hope this helps!
When using Visual Studio 2019 Professional, an exception is occassionally thrown with a 'System.InvalidCastException' being recorded in the log.
[Log]