How to fix an annoying ReSharper – NuGet error
Posted
by terje
on Geeks with Blogs
See other posts from Geeks with Blogs
or by terje
Published on Wed, 30 Oct 2013 14:13:17 GMT
Indexed on
2013/10/30
21:56 UTC
Read the original article
Hit count: 308
Visual Studio
Originally posted on: http://geekswithblogs.net/terje/archive/2013/10/30/how-to-fix-an-annoying-resharper-ndash-nuget-error.aspx
Using NuGet in Visual Studio together with ReSharper may sometimes lead you into an annoying error where ReSharper indicates your code has an error, but the solution builds just fine.
This may happen if you have a set of NuGet packages, and you either just restore them, or delete them on disk and then restore again. Your code ends up looking like this, note the red missing functions, which comes from the Moq library - which is downloaded from NuGet:
while the Build is still fine, it compiles without any errors:
This stackoverflow question gives some different approaches to solve this, but my experience have been that the Resharper Suspend-Resume trick most often solves the issue:
In Visual Studio: Go to Tools/Options/Resharper
Press Suspend:
When this is done the error markers disappear, since ReSharper now is inactive.
Then just press Resume again:
This has been submitted to Jetbrains support, ticket here: http://resharper-support.jetbrains.com/requests/3882) , if you want to follow it.
© Geeks with Blogs or respective owner