在 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
Change target framework in VB.NET console app
提问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
更新:添加屏幕截图
回答by jli
Are you sure you are right clicking the project, then clicking Properties? For me in the properties window there is a Compile
tab 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 框架中创建一个新项目。