After updating from VS 2015 Update 1 RC to VS 2015 Update 1, I keep getting the following error message:
Analyzer 'Microsoft.CodeAnalysis.VisualBasic.CodeFixes.SimplifyTypeNames.VisualBasicSimplifyTypeNamesDiagnosticAnalyzer' threw an exception of type 'System.ArgumentNullException' with message 'Value cannot be null. Parameter name: source'
on one of my projects. Code Analysis is disabled on that project (as it is on all of my projects in the solution), so I tried to turn it on and off but still the same issue.
It seems that I can still build and run my solution, but things don't really seem to work properly after the upgrade:
- everything is running really slow
- after making changes and building it doesn't apply the changes
Did anyone else have this issue after the recent update or maybe even before?
Potential work-around found in here: https://github.com/dotnet/roslyn/issues/6682 posted by user dpoeschl.
And this is his original text:
Workaround: Check this checkbox: Tools | Options | Text Editor | Basic | Code Style | Qualify member access with 'Me'
This workaround has two side-effects (that I can think of so far):
1. You will no longer get a visual indicator of the superfluous Me. or the associated code-fix, or the "Fix all occurrences in" options for easily achieving compliance.
2. Any code generation features that generate fully qualified member accesses and depend on the Simplifier to remove them if appropriate (or that explicitly check this option) will now generate non-compliant code by default.
Enabling this option is particularly non-invasive in both VS2015 & VS2015 Update 1 because this option is only enforced in one direction. That is, the checkbox being unchecked means the analyzer runs, does some deeper analysis (that fails in this case), and offers you a lightbulb when you have qualified member accesses, while the checkbox being checked means that we opt out of the deeper analysis very early and you don't get any lightbulbs telling you to add Me. qualification.
It has worked for me, it might as well fix the problem for others.