Jeffrey Palermo (.com)

Sponsors

The Lounge

News

Advertisement

Images in this post missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at imagehelp@codebetter.com
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. 


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

[Advertisement]

Comments

James Kovacs wrote re: Tips for immediately using R# 3.0.2 with VS 2008
on Wed, Nov 21 2007 5:39 PM

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

SteveG wrote re: Tips for immediately using R# 3.0.2 with VS 2008
on Wed, Nov 21 2007 6:13 PM

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

Casey wrote re: Tips for immediately using R# 3.0.2 with VS 2008
on Thu, Nov 22 2007 4:06 AM

Nice tips, thanks ...

Alexey Rusakov wrote re: Tips for immediately using R# 3.0.2 with VS 2008
on Fri, Nov 23 2007 4:13 PM

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

GrabBag wrote ReSharper in VS 2008
on Mon, Nov 26 2007 9:39 AM

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

» Daily Dose of Links - 20071205 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats. wrote » Daily Dose of Links - 20071205 Alvin Ashcraft’s Daily Geek Bits: Daily links plus random ramblings about development, gadgets and raising rugrats.
on Wed, Dec 5 2007 10:05 AM

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