简体   繁体   中英

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.

Now from Visual Studio 2012, also if I target .NET 4.0 (Properties->Application->Target Framework), that doesn't seem to work. (The same happens from Visual Studio 2010, which by the way cannot target 4.5 at all!).

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).

So, what is Visual Studio -> Properties -> Application -> Target Framework -> 4.0 supposed to do?

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.

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? .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM