如何ReSharper的被告知的框架版本? [英] How can Resharper be made aware of the framework version?

查看:143
本文介绍了如何ReSharper的被告知的框架版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编码在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的被告知的框架版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆