none
VS2010 seems to target wrong framework RRS feed

  • Question

  • I have a simple website which is fine if I target .Net 4, but if I select the target framework as 3.5, it seems to incorrectly target .Net 2.0? Switching back and forth between 3.5 and 4.0 targets actually results in the pages (via showing System.Environment.Version.ToString()), and the Dev Webserver itself (via double-clicking on the system tray icon), reporting 4.0 when targetted for 4.0, and 2.0 when targetted at 3.5.

    All versions of .Net are installed on my machines, and I have reproduced this on 2 separate machines, one with VS2010 Pro, and the other with Visual Web Developer 2010 Express.

    Is this a bug, or am I missing something?

    Thanks for any help

    Ade

    Monday, September 6, 2010 9:40 AM

Answers

  • I think what you may be missing is that 3.0 and 3.5 are not full frameworks, but extensions of 2.0. If you are not specifically using Framework features added to 2.0 in the extensions, there is no need for 3.0/3.5 to support your app.

     

    • Marked as answer by Rhaglen Monday, September 6, 2010 3:03 PM
    Monday, September 6, 2010 2:55 PM

All replies

  • I think what you may be missing is that 3.0 and 3.5 are not full frameworks, but extensions of 2.0. If you are not specifically using Framework features added to 2.0 in the extensions, there is no need for 3.0/3.5 to support your app.

     

    • Marked as answer by Rhaglen Monday, September 6, 2010 3:03 PM
    Monday, September 6, 2010 2:55 PM
  • Thanks! This is really annoying, but I was actually trying to work out whether my hosting account had been upgraded. .Net 3.5 and AJAX support came together as part of an upgrade, which was supposed to take effect "in the next 24-48 hours". So I was expecting the version to change as an indication that I could at last put some Ajax in the site! It was one of those "new accounts have it, old accounts don't" arguments which eventually got resolved by "upgrading" my account to the same version!

    One of the slightly unexpected "features" of VS2010 is that, having added the 3.5 AJAX Control toolkit to my Toolbox, if I target .Net 2.0 for the website, the Ajax tab disappears, so I needed to be certain that everything had changed before I built and deployed the site. Needless to say, I've just tried it and it all works fine, despite the displayed version of .Net not having changed! It probably took 5 minutes rather than 48 hours, and I've been sitting here staring at it for no reason ever since!

    Thanks again. Although it does seem like there at least ought to be a minor version number we could check to find out what features the host supports, rather than just have to try adding a feature and have it not work!

    Ade

    Monday, September 6, 2010 3:14 PM