I am coding in VS2008 with Resharper 4.5.1, but the projects are set to target .NET Framework 2.0.
Still, Resharper is making suggestions that are relevant to the .NET 3.5 framework. For instance, it tells me that I should be using collection initializers, etc...
I've looked through the settings and can't seem to find the checkbox to tell it to give 2.0 specific advice.
No matter which programming language you use, ReSharper helps you navigate your Visual Studio solutions. ReSharper lets you navigate C#, F#, VB.NET, JavaScript, TypeScript, CSS, HTML and many more languages, and even provides Go-to-Text to quickly find string literals in your code files.
ReSharper 2021.2 offers new inspections with quick-fixes for C# code analysis and nullable reference types support, and many of the features available for manually-written code files are now available for source-generated files.
ReSharper C++ is a developer productivity extension for Microsoft Visual Studio. Explore code, perform refactorings, find and fix errors and code issues, write quality code faster, and enjoy developing Unreal Engine games.
Select your project in the Solution Explorer and open the Properties tool window (F4 in the standard keyboard layout or View > Properties Window after selecting the project). In the ReSharper section, there is a Language Level property that you can set to C# 2.0. Note that there are two separate project properties windows that manage different properties, if you see tabs for "Application", "Build" and "Debug" you are in the wrong window.
As others have said, this affects the version of C#, not the version of the framework (since most of the C# 3.0 changes can be compiled to an assembly that targets .NET 2.0).
Those features are not .NET 3.5 framework features, but merely features of the 3.5 compiler. And since in VS2008 this is the compiler invoked for .NET 2 targets, it does handle these syntax extensions correctly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With