如何在 VS2005 中使用 .NET 3.0?

发布于 2024-07-16 04:16:52 字数 110 浏览 6 评论 0原文

我正在尝试在 VS2005 中使用自动实现的属性。 我的计算机上已加载 .NET 3.0 框架,但 Visual Studio 仍在使用 .NET 2.0 进行编译。 我如何告诉它使用.NET 3.0?

I am trying to use Auto-implemented properties in VS2005. I have .NET 3.0 framework loaded on my machine, but Visual Studio is still compiling with .NET 2.0. How do I tell it to use .NET 3.0?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

雾里花 2024-07-23 04:16:52

不幸的是,我认为不可能做到这一点,因为这是 C# 编译器的一项功能。 Visual Studio 2005 被硬编码为使用 C# 2.0 编译器。 您需要升级到 Visual Studio 2008 才能使用新的 C# 3.0 功能。

Unfortunately, I don't think it is possible to do this, since that is a feature of the C# compiler. Visual Studio 2005 is hard-coded to use the C# 2.0 compiler. You need to upgrade to Visual Studio 2008 to use the new C# 3.0 features.

梦开始←不甜 2024-07-23 04:16:52

自动生成的属性需要 C#3.0,这在 VS2005 中不可用。 您需要使用VS2008来获取自动生成的属性语法。

Autogenerated properties require C#3.0 which isn't available in VS2005. You need to use VS2008 to get the autogenerated property syntax.

装迷糊 2024-07-23 04:16:52

转到您的项目属性。 在应用程序选项卡下,您可以更改目标框架

Go to your project properties. Under the application tab you can change your Target Framework

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文