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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
spiderman
  • 1,565
  • 2
  • 16
  • 37
  • With a hack, Visual Studio 2010 *can* actually target .NET 4.5: *[Targeting .NET Framework 4.5 via Visual Studio 2010](http://stackoverflow.com/questions/12390175)* – Peter Mortensen Jul 23 '15 at 17:58

1 Answers1

1

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

Community
  • 1
  • 1
spiderman
  • 1,565
  • 2
  • 16
  • 37