Use with Visual Studio 2010 but for Dot Net Framework 2.0.5
Hi,
I just discovered Resharper last weekend and have begun using it today. I am using a trial version right now, with Visual Studio 2010. Even though I am using Visual Studio 2010, the Dot Net framework that the company I work for is currently using is 2.0.5. So, when resharper recommends coding practices that are supported beginning in C# 3.0, I know that they won't be understood when the windows application I am developing is built by the Release Engineer's on the build machine that currently uses Visual Studio 2005.
Is there some way that I can indicate in ReSharper that I only want tips that will work with C# 2.0?
Please advise.
Thanks!
:) Anne
Please sign in to leave a comment.
Hello Anne
You can open the Properties window for each project (select a project in Solution Explorer and click View | Properties) and set the 'C# Language level' property to 'C# 2.0'. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Thank you so much, Audrey!
You've taught me something I didn't know about Visual Studio!
Have a nice day!
:) Anne
Hi again,
I do have one question, which I feel I should know the answer to, but don't :(
The C# Language Level -- does that equate to the Dot Net Framework.
For instance C# Language Level of 2 is what is understood by Dot Net Framework 2.
Please advise.
Thanks!
:) Anne
Hello Anne
C# version and .NET Framework version are not exactly the same thing. Some language features of C# 3.0 are implemented on a compiler level, so you can set the target framework of your project to .NET Framework 2.0 and still use such language features as 'var', object/collection initializers, lambdas etc (except extension methods). However, you will need a C# 3.0 (or higher) compiler for that. Note that Visual Studio 2005 comes with C# 2.0 compiler, so it is safer to set the language level to C# 2.0. Let me know if this helps. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
Thank you Audrey,
Thank you for the very good explanation. I understand now.
That helps tremendously.
:) Anne