简体   繁体   English

安装了Net Framework 4.5。 可以构建/定位Framework 4.0吗?

[英]Installed Net Framework 4.5. Can build/target Framework 4.0?

I have installed Visual Studio 2012 Express , and .NET Framework 4.5 got installed together. 我已经安装了Visual Studio 2012 Express ,并且.NET Framework 4.5一起安装了。

Now from Visual Studio 2012, also if I target .NET 4.0 (Properties->Application->Target Framework), that doesn't seem to work. 现在从Visual Studio 2012开始,如果我的目标是.NET 4.0(属性->应用程序->目标框架),那似乎也不起作用。 (The same happens from Visual Studio 2010, which by the way cannot target 4.5 at all!). (Visual Studio 2010中也是如此,顺便说一下,它根本无法定位到4.5!)。

What I have noticed is that if I debug my project, and set a Watch on a SqlConnection variable, I see all the new 4.5 member properties (for example I see SqlConnection.ClientConnectionId property, introduced with .NET 4.5). 我注意到的是,如果调试我的项目,并在SqlConnection变量上设置Watch,我会看到所有新的4.5成员属性(例如,我看到了.NET 4.5引入的SqlConnection.ClientConnectionId属性)。

So, what is Visual Studio -> Properties -> Application -> Target Framework -> 4.0 supposed to do? 那么,Visual Studio-> 属性 -> 应用程序 -> 目标框架 -> 4.0应该做什么?

This 'strange' behaviour looks, in fact, perfectly normal when you realize that the installation of .NET Framework 4.5 is a replacement of .NET 4.0. 实际上,当您意识到安装.NET Framework 4.5 替代 .NET 4.0时,这种“奇怪”的行为看起来非常正常。

Look at Stack Overflow answer Can a build server with .NET 4.5 installed successfully deploy a project targeting 4.0 to a server with only .NET 4.0 installed? 查看Stack Overflow答案是否可以将安装了.NET 4.5的构建服务器成功地将目标为4.0的项目部署到仅安装.NET 4.0的服务器上? .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到目标 .NET Framework 4.0 - Can't find target .NET Framework 4.0 安装Framework 4.5时,以.NET Framework 4为目标 - Targeting .NET Framework 4 when Framework 4.5 is installed 如果将框架替换为.NET 4.5,对于使用.NET 4.0的应用程序是否安全? - Is it safe for an application using .NET 4.0 if the framework is replaced with .NET 4.5? Visual Studio 2010错误:打开.NET 4.0项目时“未安装项目目标框架” - Visual Studio 2010 error: “Project Target Framework Not Installed” when opening a .NET 4.0 project 选择ASP.Net Framework 4.5作为目标框架? - Select ASP.Net framework 4.5 as target framework? 与目标框架vs.2010相比,.net框架4.0和.net框架4.0客户端配置文件有何区别? - what's the difference in vs2010 of the target framework: .net framework 4.0 and .net framework 4.0 client profile? 将目标框架从.NET 3.5更改为.NET 4.0 - Changing Target Framework from .NET 3.5 to .NET 4.0 未安装项目目标框架 - Project Target Framework Not Installed 在Visual Studio 2010中找不到.net Framework 4.0或.net Framework 4.5 - Cannot find .net Framework 4.0 or .net Framework 4.5 in Visual Studio 2010 如何从SilverLight 4应用程序项目中定位.net framework 4.0? - How to target .net framework 4.0 from a SilverLight 4 Application Project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM