visual-studio 如何在 Visual Studio 2010 中为项目设置默认的 .Net 框架版本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3927909/
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-10-22 12:36:43  来源:igfitidea点击:

How to set the default .Net framework version for projects in visual studio 2010

visual-studiovisual-studio-2010

提问by Sean Kearon

How do you set the default framework version for new projects in Visual Studio 2010?

如何在 Visual Studio 2010 中为新项目设置默认框架版本?

回答by JaredPar

The easiest way I know of is the following

我所知道的最简单的方法如下

  1. File -> New Project
  2. Select the Framework you want
  3. Create the project
  1. 文件 -> 新建项目
  2. 选择你想要的框架
  3. 创建项目

From then on the new project dialog will default to the framework you selected in step #2.

从那时起,新项目对话框将默认为您在第 2 步中选择的框架。

回答by Valo

I know that this is a very old question but I needed the answer to it several times now and I keep searching for it. So, I will share my experience here and hopefully in the future I would not need to search for it too long and those who are looking for the same can find it too. I just tested it with Visual Studio 2015. Open the registry hive HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\NewProjectDialogand look for the value FxVersion(REG_SZ type). For me it used to be 4.6.1 and I changed it to 4.6.2. Now when I create a new projects they target .NET v.4.6.2 by default.

我知道这是一个非常古老的问题,但我现在多次需要它的答案并且我一直在寻找它。所以,我将在这里分享我的经验,希望将来我不需要搜索太长时间,那些正在寻找相同的人也可以找到它。我刚刚用 Visual Studio 2015 对其进行了测试。打开注册表配置单元HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\NewProjectDialog并查找值FxVersion(REG_SZ 类型)。对我来说,它曾经是 4.6.1,我把它改成了 4.6.2。现在,当我创建一个新项目时,它们默认针对 .NET v.4.6.2。