question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'FakeItEasy.Analyzer.RepeatedAssertionAnalyzer' threw an exception of type 'System.NullReferenceException'

See original GitHub issue

FIE v4.5.0 The CS8032 disappeared after restarting VS 2017 already upgraded to 4.5.0 (from 4.4.0)

Severity	Code	Description	Project	File	Line	Suppression State	Detail Description
Warning	AD0001	Analyzer 'FakeItEasy.Analyzer.RepeatedAssertionAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set to an instance of an object.'.	XXX.Tests	D:\Source\XXX.Tests\CSC	1	Active
Warning	CS8032	An instance of analyzer FakeItEasy.Analyzer.RepeatedAssertionAnalyzer cannot be created from C:\Users\XXX\.nuget\packages\fakeiteasy.analyzer.csharp\4.5.0\analyzers\dotnet\cs\FakeItEasy.Analyzer.CSharp.dll: Could not load type 'FakeItEasy.Analyzer.RepeatedAssertionAnalyzer' from assembly 'FakeItEasy.Analyzer.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c'..	XXX.Tests		1	Active	System.TypeLoadException: Could not load type 'FakeItEasy.Analyzer.RepeatedAssertionAnalyzer' from assembly 'FakeItEasy.Analyzer.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=eff28e2146d5fd2c'.
   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)
   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)
   at Microsoft.CodeAnalysis.Diagnostics.AnalyzerFileReference.Extensions`1.GetAnalyzersForTypeNames(Assembly analyzerAssembly, IEnumerable`1 analyzerTypeNames, Boolean& reportedError)
-----


Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
thomaslevesquecommented, Feb 27, 2018

OK, I understand now. It’s not ILaundryAnalyzer.InitializeAsync that is considered an invocation expression, but nameof(ILaundryAnalyzer.InitializeAsync). nameof is a contextual keyword; it’s considered a keyword only if there’s no method called “nameof”. From a syntactic point of view, nameof(ILaundryAnalyzer.InitializeAsync) is a invocation expression: it will resolve to a method call if a method called “nameof” is in scope.

1reaction
blairconradcommented, Feb 28, 2018

This change has been released as part of FakeItEasy 4.5.1. Thanks, @Mertsch. Look for your name in the release notes! 🏆

Read more comments on GitHub >

github_iconTop Results From Across the Web

TopLevelParameterNameAnalyzer threw an exception of ...
Mvc.Analyzers.TopLevelParameterNameAnalyzer' threw an exception of type 'System.NullReferenceException' with message 'Object reference not set ...
Read more >
c# - What is a NullReferenceException, and how do I fix it?
I have some code and when it executes, it throws a NullReferenceException , saying: Object reference not set to an instance of an...
Read more >
How can I fix the error: System.NullReferenceException
A NullReferenceException exception is thrown when you try to access a member on a type whose value is null. A NullReferenceException exception ......
Read more >
Random error with SonarAnalyzer - SonarQube
Hello,. We are using SonarAnalyzer.CSharp version 8.26.0.34506 as nuget package and when randomly analyze our code it throws this exception:
Read more >
How to Fix NullReferenceException in C#! (4 Step Process)
Let's learn what is a NullReferenceException, what causes it and a Step-by-Step process for how to Fix NullReferenceException in C#! ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found