我仍然可以在 VisualStudio 2010 中以 .NET Framework 2.0 为目标吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/916084/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:46:12  来源:igfitidea点击:

Can I still target .NET Framework 2.0 in VisualStudio 2010?

.netvisual-studio-2010

提问by Jon B

Before upgrading to VisualStudio 2010, I want to make sure I can still target version 2.0 of the framework. I couldn't find a statement about this from MS. Does anyone know?

在升级到 VisualStudio 2010 之前,我想确保我仍然可以面向框架的 2.0 版。我找不到来自 MS 的声明。有人知道吗?

采纳答案by Matthew Jones

According to this page, you can, just make sure you have .NET 3.5 SP1 installed.

根据此页面,您可以,只需确保安装了 .NET 3.5 SP1。

Visual Studio 2010 includes only the .NET Framework 4. To target earlier versions of the .NET Framework, you must have the .NET Framework 3.5 Service Pack 1 (SP1) installed.The .NET Framework 3.5 SP1 includes the .NET Framework 2.0, the .NET Framework 3.0, and the .NET Framework 3.5 SP1.

Visual Studio 2010 仅包含 .NET Framework 4。面向 .NET Framework 的早期版本,您必须安装 .NET Framework 3.5 Service Pack 1 (SP1)。.NET Framework 3.5 SP1 包括 .NET Framework 2.0、.NET Framework 3.0 和 .NET Framework 3.5 SP1。

回答by JaredPar

Yes this is possible. It is known as Multi-targeting and is a feature most definitely supported in VS2010.

是的,这是可能的。它被称为多目标,是 VS2010 中最受支持的功能。

回答by leppie

Some one else asked this just an hour ago CodeProject. The answer is yes. IT supports 2.0 -> 4.0.

一个小时前还有人问这个 CodeProject。答案是肯定的。IT 支持 2.0 -> 4.0。

回答by Kamiikoneko

Yes

是的

Googling this brought up a geekswithblogs post showing the multi-targeting functionality. Apparently StackOverflow won't let me post the link. But the answer is Yes

谷歌搜索带来了一个 geekswithblogs 帖子,展示了多目标功能。显然 StackOverflow 不会让我发布链接。但答案是肯定的

回答by TheTXI

This feature was included in Visual Studio 2008 as a way to handle 2.0 through 3.5 projects, so it would be an epic failure on Microsoft's part not to include the same functionality in their next release. With 2010 you should be able to support projects in the 2.0 to 4.0 framework ranges (and beyond possibly depending on the framework upgrades).

此功能已包含在 Visual Studio 2008 中,作为处理 2.0 到 3.5 项目的一种方式,因此对于 Microsoft 而言,在其下一个版本中不包含相同功能将是一个史诗般的失败。到 2010 年,您应该能够支持 2.0 到 4.0 框架范围内的项目(甚至可能超出框架升级的范围)。

回答by reformed2

Here is how you change the Target Framework in VS2010.

以下是在 VS2010 中更改目标框架的方法。

1) Right click the Project.

1) 右键单击项目

2) Click the "Compile" tab

2) 单击“编译”选项卡

3) At the bottom click "Advanced Complie Options..."

3) 在底部点击“高级编译选项...

4) Choose the framework from "Target framework (all configurations):"

4) 从“目标框架(所有配置):”中选择框架