Resharper told me that it can't find a namespace but the code works well.
Now I'm having a problem which is described as the title.
For example, I have a class Converter in a namespace MyApplication.Utility. In the other class User, Converter is being used here.
Then all of the occurrences of Converter in User class are being reported as "missing assembly reference", "The type or namespace name 'Utility' does not exist in the namespace 'MyApplication' (are you missing an assembly reference?)"
But actually, I'm able to compile the program and run it without any errors. And these errors are gone when I disable Resharper.
I checked project reference and I can't find a reason why. The project is still working except I'm having some errors in the error list.
Can someone tell me how to fix the problem?
FYI, my resharper version is 2017.2.2 built on 2017 October 06.
Please sign in to leave a comment.
Hello!
Thank you for contacting us.
Please try suggestion from the following help article - https://resharper-support.jetbrains.com/hc/en-us/articles/206546989
If it doesn't help some demo solution illustrating the problem will be highly appreciated.
Thank you.
In my case, this issue has gone when I removed unused project references (Optimize References Ctrl+Alt+Y).
Solution had two projects:
1. .NET multi-target library (.NET Framework, Core, and Standard)
2. .NET Framework application referencing the library.
Probably, Visual Studio added a "netstandard" reference to the application project when it was created.
That reference broke ReSharper code analysis.
Thanks
Same problem for me today, the issue was caused by different .NET Framework targets between involved projects.
No issue at all with Resharper disabled.
Resharper 2020.3