在 VB.NET 控制台应用程序中更改目标框架

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

Change target framework in VB.NET console app

vb.netvisual-studio-2010

提问by Dustin Davis

I created a VB Console app and it defaulted to .NET 4 but I need it to be .NET 3.5. I've been looking but all the references I find say to change it on the 'Compile' tab in properties but I don't have a compile tab or anything else that lets me change the target framework.

我创建了一个 VB 控制台应用程序,它默认为 .NET 4,但我需要它是 .NET 3.5。我一直在寻找,但我找到的所有参考资料都说要在属性的“编译”选项卡上更改它,但我没有编译选项卡或任何其他可以让我更改目标框架的东西。

Any ideas other than recreating the project?

除了重新创建项目之外还有其他想法吗?

Note: I'm using VS2010 Ultimate

注意:我使用的是 VS2010 Ultimate

Update: added screen shot

更新:添加屏幕截图

enter image description here

在此处输入图片说明

回答by jli

Are you sure you are right clicking the project, then clicking Properties? For me in the properties window there is a Compiletab on the left side (under Application), and there is an option to change the target under Advanced Compile Options....

您确定要右键单击该项目,然后单击“属性”吗?对我来说,在属性窗口Compile的左侧(在 下Application)有一个选项卡,并且有一个选项可以更改 下的目标Advanced Compile Options...

回答by hi.im.new

In vs2010 you goto PROJECT ---> SLN Name properties --> COMPILE ---> ADVANCED COMPILE OPTIONS(BOTTOM). Now Reverting it to 3.5 is something that as far as I know is something you can't do, atleast not easily or advised. Obviously upgrading from say a 2.0 to a 3.5 or 4.0 framework is easy as the step's above. Your best bet is unfortunately to create a new project in the 3.5 framework.

在 vs2010 中,您转到 PROJECT ---> SLN Name properties --> COMPILE ---> ADVANCED COMPILE OPTIONS(BOTTOM)。现在将它恢复到 3.5 是据我所知是你不能做的事情,至少不容易或建议。显然,从 2.0 升级到 3.5 或 4.0 框架很容易,就像上面的步骤一样。不幸的是,您最好的选择是在 3.5 框架中创建一个新项目。

回答by RainerJ

Project/Properties/Compile/Advanced Compile Options

项目/属性/编译/高级编译选项

enter image description here

在此处输入图片说明