[英]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.