elishalom / netcodemetrics

Other
33 stars 13 forks source link

'System.NullReferenceException' occurs when starting up Visual Studio 2019 (Professional) #10

Closed michaelm7456 closed 4 years ago

michaelm7456 commented 5 years ago

When starting up Visual Studio 2019 Professional, a Visual Studio MessageBox pops up advising the Extension has caused an issue and to check the following .xml file for more details.

C:\Users\UserName\AppData\Roaming\Microsoft\VisualStudio\16.0_43a43d77\ActivityLog.xml

[Contents of 'ActivityLog.xml' file]

[Stack Trace]

2529 Error Editor or Editor Extension System.NullReferenceException: Object reference not set to an instance of an object. at CodeMetrics.Adornments.MetricsAdornment.RepaintComplexity(ITextSnapshot textSnapshot) at CodeMetrics.Adornments.MetricsAdornment.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler`1 eventHandlers, TArgs args)
michaelm7456 commented 5 years ago

This looks to be very similar to Issue # 3

Where there is an issue related to the 'CodeMetrics.Adornments.MetricsAdornment.RepaintComplexity' Method.

elishalom commented 4 years ago

A possible fix to this issue is in version 0.9.1.1

coolhome commented 4 years ago

Currently working for myself in VS2019

michaelm7456 commented 4 years ago

I've since downloaded Version 0.9.1.1 and encountered no further occurrences 'System.NullReferenceException' when starting Visual Studio 2019.

I'm happy for this one to be marked as resolved and will mark it as closed.

Many thanks for looking into this one guys!