如何ReSharper的被告知的框架版本?

编程入门 行业动态 更新时间:2024-10-25 22:37:35
本文介绍了如何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的被告知的框架版本?

本文发布于:2023-10-31 05:09:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1545097.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:被告   框架   版本   ReSharper

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!