Microsoft .NET frameworks together on the same PC
Date: Wednesday, December 19, 2007 @ 02:48:09 UTC
Topic: What do we know?


Now that visual Studio 2008 has been released, there is yet another Microsoft .NET framework version 3.5. This builds upon the 3.0 version released earlier, so both parts are installed in separate directories. There are a couple of articles in the Group29.com forums talking about .NET framework and Visual Studio issues, these are consolidated in this article.



The .NET frameworks I have seen so far are:

v1.0.3705 (shipped with Visual Studio .NET)
v1.1.4322 (shipped with Visual Studio 2003)
v2.0.50727 (shipped with Visual Studio 2005)
v3.0.4506 (WinFX)
v3.5.21022 (shipped with Visual Studio 2008) (requires 3.0)

I have 1.1, 2, 3, and 3.5 all installed on my PC. All of the Microsoft .NET versions 1.x, 2.x, and 3.x seem to play well together. My Experience is that I can have Visual Studio 2003, 2005, and 2008 all loaded on the same PC. According to the Microsoft MVPs, there is no harm in keeping multiple frameworks installed on the same system; they are installed side by side without conflicts.


.NET 1.0 to 1.1 upgrade.

For Framework 1.x, you can remove the 1.0 and use 1.1 one as it is backwards compatible and should load the correct assemblies/CLR when you are running your application built in a different (older) version of the framework.

On change of version of .net framework from 1.0 to 1.1 you can have a problem when you run an application, its is developed under v1.0.3705, and the IIS webserver runs v1.1.4322. Add these lines to the app.config file:



.NET Framework coexist / install 2.0 and 1.1 together

The Microsoft .NET Framework was made available on October 27, 2005 for download. The Visual Studio 2005 software also became available in production for those with MSDN subscriptions. Since then, I have been testing with Visual Studio 2005 (Visual Studio 8.0) on Windows XP. (Check out lesson 12, the RSS Reader.)

I have read many articles and it appears you can install .NET 2.0 on a machine that has .NET 1.1

This Microsoft MSDN page talks about what happens with apps that are built for each framework.

When you build your application in Visual Studio 2003 you can select if you want the app to be compatible with 1.0 or 1.1. (Right click on the project and select properties and then look at "Build" under Common Properties.)

Visual Studio 2005 does not seem have this feature. And it would make sense if it was designed on the 2.0 Framework. I speculate that Visual Studio 9 (in 2007?) may allow 2.0 or 2.x in the future.

Install .NET Framework 2.0 on Windows XP SP1

The .NET framework required Windows XP service pack 2. But, it is also possible to install the .NET Framework 2.0 and Software Development Kit (SDK) without installing Windows XP service pack 2. I had Windows XP service pack 1 with hotfixes installed at a work related computer. They had not gone to SP2 out of fear of support issues. This prevented Visual Studio Express 2005 from being loaded on the machine. However, you can run the command line compiles.

Group29 Forums: Visual Studio 2005 Installation WinXP SP1

Aaron Stebner has two good tricks
How to install VS 2005 and MSDN for VS 2005 on XP without SP2


Building .NET projects from the command line


You can set your path to the Net Framework Redistributables.

C:WINNTMicrosoft.NETFrameworkv2.0.50727

Then use MSBUILD.EXE to build your project on the command line.

It will find a VBPROJ or CSPROJ file and build the project.

How To: Build Specific Targets in Solutions with MSBuild.exe



Side by side ASP.NET 1.1 and 2.0 on Windows 2000 IIS 5.0

If you're running IIS 5.0, run your 2.0 apps either in "High Isolation", isolated from each other and 1.1 apps, or in "Medium Isolation", with all 2.0 apps pooled in one process.

You can choose High (Isolated) or Medium (Pooled) from the Application Protection drop-down list on the Home Directory or Virtual Directory property sheet in the IIS Manager, in IIS 5.0

If you decide to run your application as a separate process, or with other applications in a single pooled process, you will need to select High (Isolated) or Medium (Pooled) from the Application Protection drop-down list on the Home Directory or Virtual Directory property sheet. You should first create an application directory and designate it as either a Home Directory or Virtual Directory, if you haven't already done so. By default, all new applications are run in medium protection. You can run a very large number of applications at medium isolation, but you will only be able to run a few dozen applications at high isolation, because each process consumes significant resources.

IIS 5 Tuning (Microsoft.com)

How does the web server realize what framework to use when calling up a particular web app? By assigning it to the proper .Net Framework version in the ASP.NET tab in the website's "properties" in the IIS Manager.


Useful links:

MSDN Side by side support article (Microsoft.com)

Microsoft .NET Framework

Group29 Forums: Side by side ASP.NET 1.1 and 2.0 on Windows 2000 IIS 5.0

Group29 Forums: Visual Studio 2005 Installation WinXP SP1

Group29 Forums: .NET Framework coexist / install 2.0 and 1.1 together







This article comes from Group29.com - What did you expect?
http://www.group29.com

The URL for this story is:
http://www.group29.com/modules.php?name=News&file=article&sid=172