Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Mailbag: Why does VS 2003 setup install the .NET Framework 1.1 if 2.0 is already installed?

Mailbag: Why does VS 2003 setup install the .NET Framework 1.1 if 2.0 is already installed?

  • Comments 3

Question

I am running the Windows Vista December Community Technology Preview, which includes the .NET Framework 2.0 as part of the OS.  When I try to install Visual Studio .NET 2003 on this system, setup tries to install the .NET Framework 1.1 even though .NET 2.0 is already there.  Why?

Answer

Each version of the .NET Framework is designed to co-exist side-by-side with all other versions of the .NET Framework.  That means you can have the .NET Framework 1.0, 1.1 and 2.0 on your system at the same time.  In addition, each version of Visual Studio is tightly coupled with a specific version of the .NET Framework, and the setup for Visual Studio will always try to install the exact version it is coupled with if it is not already installed on the machine.  In this scenario, the system has the .NET Framework 2.0 installed but not 1.0 or 1.1.  Visual Studio .NET 2003 is coupled with .NET 1.1, so setup will install it.

 

  • I think the real confusing question is:

    Why is each version of Visual Studio so tightly coupled with a specific version of the .NET Framework that we can't simply have a single (latest 2.0) version of .NET Framework?
  • Hi Blake - your question is a much more complicated one, and unfortunately one that I don't have a good answer to. This design has been in place since before I started at Microsoft, from back in the early days of the .NET Framework 1.0 and VS .NET 2002. There are ways you can configure VS to build applications that target older versions of the .NET Framework, assuming that you do not reference types that only exist in the newer version. However, as things stand now, VS and the .NET Framework are really tightly coupled, and VS needs the specific version of the .NET Framework that it shipped with for design-time scenarios to work correctly. I am hoping that in the future the .NET Framework will be treated as more of a platform so that VS can rev without requiring the runtime to rev. That would greatly simplify deployment scenarios for developers writing managed code.
  • All .NET framework applications are tied to a single version of the framework. By default, if you installed an application built in .NET 1.1, it will use the 1.1 framework if loaded on the system, otherwise it will try to use 2.0 but it may not work properly. App.configs can force a specific version in such cases (even 1.0, possibly).
Page 1 of 1 (3 items)
Leave a Comment
  • Please add 4 and 8 and type the answer here:
  • Post