I believe, the error message not related to Serilog
specifically, but is rather because of the code/assembly/package specific structure/modifiers etc.
So, the issue is that Resharper
shows the error (and the code (from assembly referenced) is not accessible for navigation to) when Visual Studio
navigates (by Go to Definition
command) to metadata and compiles the code well (including, showing the method description successfully as well).
The method is defined in assembly as follows:
namespace Serilog
{
public static class Log
{
public static ILogger ForContext<TSource>();
My current version of Visual Studio: 2017 (15.4.4) Resharper: 2017.2.2
Generally, everything works well for me, but because of "lost" definition, my object defined (Logger) indicated as unresolved through the whole code, so all my scrolling bar is red with error notes, which is quite confusing.
Any thoughts?
This following seems to work for me most of the time
Solution 1
Tools->Options->ReSharper
It refreshes the cache and/or some other dark magic
Solution 2
You could try clearing the ReSharper cache implicitly
ReSharper->Options->Environment->General
Solution 3
You can also try unloading and then reloading the project.
Solution Explorer->Right Click
Solution 4
As a last resort you can try to delete the solution cache manually
%LOCALAPPDATA%\JetBrains\Transient\ReSharperPlatformVsXX\vXX\SolutionCaches\
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With