Tips for immediately using R# 3.0.2 with VS 2008

There is a bit of confusion out there because R# 3.0.2 doesn’t immediately support code analysis and intellisense for the new C# 3.0 features like LINQ queries, etc.  What I’ve heard is that in Q12008, we’ll have a R# that will support all the new stuff.  While it’s a shame that it’s not ready to go immediately (because VS 2008 RTM is available as of this week), we can still us R# 3.0.2 with VS 2008 to get most of the value and ease of use we’ve come to expect from a productivity add-in.  Here are the steps:

First, the big problem is that when we start using new features in VS 2008, R# doesn’t cooperate because it doesn’t know about the new syntax that’s now available.  The on-the-fly code analysis goes haywire as depicted in the screenshot below:

Not only does the code analysis not work properly, but the R# intellisense we get doesn’t show the proper options with extension methods.  We’ll go to Resharper>Options and change two settings.  First, let’s turn off R# code analysis:

Next, we’ll tell R# to let VS give us intellisense since VS knows about the full options:

Now, if we look back at the code, all the red goes away, and our intellisense window has full support, like the “where” keyword in the LINQ query below:

With these two changes, we get rid of the immediate annoyances, but we can continue to leverage all the other great features R# gives us like file/type navigation, NANT/NUNIT support, etc.

If you have any more tips that would be helpful during the interim for using R# 3.0.2 with VS 2008 until R#4 comes out, please post a comment. 

This entry was posted in Featured. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

4 Responses to Tips for immediately using R# 3.0.2 with VS 2008

  1. There’s also a Ctrl-8 hotkey to suppress the code analysis for the current file.

  2. Casey says:

    Nice tips, thanks …

  3. SteveG says:

    Very good to know – thanks for the tip! (I’m installing VS 2008 now)

  4. James Kovacs says:

    If you use VS2008 to target .NET 2.0/3.0, you can leave ReSharper’s Code Assist and Intellisense turned on since VS prevents you from using the new language constructs. It’s only if you’re using the new .NET 3.5 features in VS2008 that ReSharper 3.0 goes haywire. Now if JetBrains would just toggle those settings automatically when switching between .NET 2.0/3.0 and .NET 3.5 targets. Sounds like a ReSharper add-in in the making…

Leave a Reply