我编码在VS2008与ReSharper的4.5.1,但这些项目都设置为目标的.NET Framework 2.0。
I am coding in VS2008 with Resharper 4.5.1, but the projects are set to target .NET Framework 2.0.
不过,ReSharper的是使那些相关建议在.NET 3.5框架。例如,它告诉我,我应该使用集合初始化等...
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...
我已经通过的设置看,似乎无法找到的复选框告诉它给2.0具体建议。
I've looked through the settings and can't seem to find the checkbox to tell it to give 2.0 specific advice.
推荐答案选择在Solution Explorer中的项目并打开属性工具窗口( F4 的标准键盘布局)。在ReSharper的部分,还有就是你可以设置为C#2.0中的语言级别属性。
Select your project in the Solution Explorer and open the Properties tool window (F4 in the standard keyboard layout). In the ReSharper section, there is a Language Level property that you can set to C# 2.0.
正如其他人所说,这会影响中的 C#的版本,不是框架的版本(因为大多数的C#3.0的变化可以编译成面向.NET 2.0的程序集)。
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).
更多推荐
如何ReSharper的被告知的框架版本?
发布评论