CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeffrey Palermo [MVP]

Software management consultant and CTO, Headspring Systems

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. 


Published Nov 21 2007, 11:18 AM by Jeffrey Palermo
Filed under:

Comments

James Kovacs said:

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...

# November 21, 2007 5:39 PM

SteveG said:

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

# November 21, 2007 6:13 PM

Casey said:

Nice tips, thanks ...

# November 22, 2007 4:06 AM

Alexey Rusakov said:

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

# November 23, 2007 4:13 PM

GrabBag said:

UPDATE 11/26/2007 Jeffrey Palermo notes that you can use R# in VS 2008 by turning off a couple of features

# November 26, 2007 9:39 AM

» Daily Dose of Links - 20071205 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats. said:

Pingback from  » Daily Dose of Links - 20071205 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats.

# December 5, 2007 10:05 AM

About Jeffrey Palermo

Jeffrey Palermo is a software management consultant and the CTO of Headspring Systems in Austin, TX. Jeffrey specializes in Agile coaching and helps companies double the productivity of software teams. Jeffrey is an MCSD.Net , Microsoft MVP, Certified Scrummaster, Austin .Net User Group leader, AgileAustin board member, INETA speaker, INETA Membership Mentor, Christian, husband, father, motorcyclist, Eagle Scout, U.S. Army Veteran, and Texas A&M University graduate. Check out Devlicio.us!

This Blog

Syndication