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

Temporarily disable code analysis for single code file with Resharper 3.0.2 and VS 2008

If you hit a code file that's using one of the new funky features of C# 3.0, and Resharper code analysis doesn't recognize it, like property initializers, var, etc, just press the following to disable code analysis for the current code file only:

CTRL+8

Code analysis will turn off, and the red will go away.  Resharper will remember this preference for that code file until you close and reopen Visual Studio.

If you want to turn code analysis back on, just press CTRL+8 again.  You can turn it on and off as much as you like.  I'm finding this especially useful when giving presentations such as the ones at DevTeach.  I want to keep Resharper enabled in order to use all the features, but for some of the code files, I need code analysis turned off.  CTRL+8 allows me to keep the global option on and just turn it off for a single code file.  I love little hidden gems!!



Comments

Joe Ocampo said:

You made my day!  Thanks!

# November 28, 2007 12:28 PM

Eric Hauser’s Blog » Blog Archives » Toggle Resharper code analysis with C# 3.0 said:

Pingback from  Eric Hauser’s Blog  » Blog Archives   » Toggle Resharper code analysis with C# 3.0

# November 29, 2007 10:01 PM

Andrew Siemer said:

Thanks man!  You're a life saver.  I can't wait for the next version of ReSharper so that it works properly with all the new C# widgetry!!!

# January 7, 2008 2:37 PM

Jeffrey Palermo said:

@Andrew,

Glad to help.

# January 7, 2008 3:30 PM

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