How can Resharper be made aware of the framework version?

后端 未结 2 1982
刺人心
刺人心 2021-02-12 13:25

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

2条回答
  •  甜味超标
    2021-02-12 13:58

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

提交回复
热议问题