Page Start

The Page Starts Here

Home

Windows XP Tips

Windows 7 Korner

Windows 8 Korner

Windows 9 Korner

Dual Boot Korner

Random Thoughts

Quick Takes

 

NET Framework - Disk space requirements, Part 1
(Revised 02/28/09 - Now includes .Net 2.0 SP2 and Family update
revisions are marked by a red *)


In Part #1 of this article I will cover the disk space requirements, the two main types of .Net, .Net version numbers, why you need .Net, drive space requirements, an overview of where the .Net files are located on you hard drive, Service Packs and a handy .Net verification utility.

Part #2 provides additional information on .Net Redistributables and .Net Software Development Kits (SDK), links on where to download each version of .Net, disk space usage in detail on a version by version basis, tips on uninstalling .Net and addition information on the "Cleanup Tool" and "Verification Tool" mentioned below that you may find useful and more.

Utilities or Applications installed and used in this article:
All tests for this article were conducted using Windows XP Pro with Service Pack 2.

.NET Framework Setup Verification Tool:
http://blogs.msdn.com/astebner/pages/8999004.aspx
"This .NET Framework setup verification tool is designed to automatically perform a set of steps to verify the installation state of one or more versions of the .NET Framework on a computer."

.NET Framework Cleanup Tool:
http://blogs.msdn.com/astebner/pages/8904493.aspx
"This .NET Framework cleanup tool is designed to automatically perform a set of steps to remove selected versions of the .NET Framework from a computer, It will remove files, directories, registry keys and values and Windows Installer product registration information for the .NET Framework. The tool is intended primarily to return your system to a known (relatively clean) state in case you are encountering .NET Framework installation, uninstallation, repair or patching errors so that you can try to install again."

I used this tool after using the Add or Remove Programs uninstall feature. After using the Cleanup tool only a few folders and files still remained, so I deleted these manually.

JDiskReport:
http://www.jgoodies.com/freeware/jdiskreport/
"JDiskReport enables you to understand how much space the files and directories consume on your disk drives, and it helps you find obsolete files and folders. The tool analyses your disk drives and collects several statistics which you can view as overview charts and details tables. This is ad-free uncrippled no-charge binary multi-platform software that never expires."

Note: Disk space usage is listed as decimal values and does not take into account cluster size efficiency, therefore the actual disk space consumed on your hard drive will be somewhat higher than the numbers reported in this article.

Windows XP Service Pack 3 users may have problems:
As I was finishing this article an interesting issue involving .Net and XP SP3 surfaced.
A newsletter that I receive weekly ("Windows Secrets") published their December 4th, 2008 edition which included an article by Susan Bradley titled: XP Service Pack 3 blocks .NET security patches. In it she describes XP SP3 inability to install important security patches for Microsoft's .NET technology. For more detail click on the link below:
http://windowssecrets.com/2008/12/04/03-XP-Service-Pack-3-blocks-.NET-security-patches

The two types of .Net:
There are two types of .Net (pronounced Dot Net), a "Redistributable" and the "SDK" (Software Distribution Kit). The Redistributable takes far less disk space as it installs only the .NET Framework common language runtime and associated files required to run applications that are installed on your PC.

The SDK is for use by Software developers who use Microsoft's Visual Studio to create software applications and as such requires far more disk space.

There is also .NET Compact Framework
http://en.wikipedia.org/wiki/.NET_Compact_Framework
http://msdn.microsoft.com/en-us/netframework/aa497273.aspx

And a Micro Framework 2.5 SDK that supports development of code for embedded applications on small devices, which is not covered in this article.
http://msdn.microsoft.com/en-us/embedded/bb278106.aspx
http://msdn.microsoft.com/en-us/embedded/bb267253.aspx

How many version of .Net are there:
Currently there are 5 versions with version 4.0 to be released in the not to distant future.
They are as follows: .Net 1.0, 1.1, 2.0, 3.0 and 3.5 with each version having one or more Service Packs available. Service packs can be installed by using Windows Update or by manually downloading and installing the service pack.

To sort out the confusion of the real Net Framework version numbers,
See: .NET Framework version numbers
http://blogs.msdn.com/astebner/archive/2005/07/12/what-net-framework-version-numbers-go-with-what-service-pack.aspx

NET Framework Release Dates:
http://en.wikipedia.org/wiki/.NET_Framework#Versions

Also in late September of 2008 Microsoft announced the next versions of Visual Studio (VS 2010) and .NET Framework 4.0, no release date has been set at this time but early 2010 is the current a best guess.

How did .Net Framework get installed on my PC? (Revised)
So you ask yourself, how did .Net Framework get installed on my PC, I know I didn't install it. The answer in most cases it's that a software application you installed requires .Net Framework and during the application's installation process that application also installed the version of .Net it requires.

The .NET Framework Redistributables are also available for installation when using Windows Update and are listed as “Optional Updates”. Even if you have no applications installed on your computer that require .NET these optional updates will still be listed making it all to easy to download and install something you don’t need or require.

How many versions of .Net do I need?
Sooner or later you uninstall a program that you no longer need, so you click on the Control Panel, select: Add/Remove Programs and you happen to notice that there are one or more versions of .NET Framework listed and are consuming hundreds of megabytes of disk space.

If you have an application that uses/needs .NET 1.1, then 2.0 and 3.0 are not to be considered supersets or replacements for .NET 1.x. So if you where to delete version 1.1 then there is a good chance the application that requires .NET 1.1 will fail even if .Net 2.0 or 3.0 is still installed.

Each version of .NET is usually installed along with the application that requires it, so if you have three versions of .Net, then chances are that somewhere along the way you installed at a minimum 3 applications, with each of those applications requiring and installing its own version of .NET

The newer applications where most likely developed using the latest version of .Net available when the application was being developed. The older software applications that you still use are the apps that most likely installed an earlier version of .Net (for example version 1.0 and or version 1.1),  so it is entirely possible to have multiple version of .Net installed on your PC.

How much disk space does each version of .Net require?
The disk space requirements list below are based on installing the redistributable for each version of .Net and the available service packs, starting with .Net 1.0 and working up to .Net 3.5.

Note: For part #1 of this article, each version is installed by itself, so the disk space usage is only represents what is required for the currently installed version. Part 2 shows the cumulative disk space usage after each version and the associated service packs are installed. The disk space used is listed in decimal values.

If you think that the disk space consumed after installing all 5 versions of the redistributables is large wait till you see what just one single version of the Software Development Kit (SDK) consumes.

Tip:
Add/Remove does not display the true amount of disk space being consumed which is typically far more that what Add/Remove shows. I'll attempt to give you the real disk space requirements.
 
.Net folder locations - Prior to installing any Redistributables:
C:\Program Files\Reference Assemblies\ (Not created)
C:\WINDOWS\assembly (Not created)
C:\WINDOWS\Microsoft.NET\Framework (Not created)
C:\WINDOWS\SoftwareDistribution\Download (Empty)
C:\Program Files\Reference Assemblies\Microsoft\Framework\ (Not created)
C:\Program Files\MSBuild\Microsoft\Windows Workflow Foundation\ (Not created)

Global Assembly Cache:
C:\WINDOWS\assembly\GAC
http://msdn.microsoft.com/en-us/library/yf1d93sz(VS.80).aspx
"Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer."
Demystifying the .NET Global Assembly Cache:
http://www.codeproject.com/KB/dotnet/demystifygac.aspx


Suggestion: When the Installer has completed and if you are asked to reboot, wait until
a process named "NGEN" has completed before rebooting the PC. Use Windows Task Manager to monitor the CPU usage and when Ngen has completed it's task the "System Idle Process" should be at or near 99%. Hard disk activity will also be heavy until Ngen has finished. After Ngen has completed installing .Net then reboot the computer.

For more info see: Framework Tools: Native Image Generator (Ngen.exe)
http://msdn.microsoft.com/en-us/library/6t9t5wcf(VS.80).aspx

Newer versions of .Net make use of a process named "mscorsvw.exe" during the installation of .Net.  The mscorsvw process like NGEN also continues to run for a minute or two after you have received the prompt to reboot or a notice that the installation has completed. You will find that "mscorsvw" uses a significant percentage of your CPU resources and hard disk activity remains high until mscorsvw completes its task. After your PC settles down and is basically idle then reboot if required.

What is mscorsvw.exe and why is it eating up my CPU? http://blogs.msdn.com/davidnotario/archive/2005/04/27/412838.aspx

mscorsvw.exe and 100% CPU
http://www.dotnetjunkies.com/WebLog/johnwood/archive/2006/04/09/mscorsvw_cpu.aspx


Disk space requirements:

.Net Framework redistributable version 1.0
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705

Once the .Net Framework redistributable version 1.0 was installed I used Windows Update to install the Net Framework Redistributable 1.0 SP3. (Reboot Required - Yes)
Total disk space required = 60.3MB
Control Panel/ Add/Remove only shows: 16.13MB

Folder names and file versions:
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705 (34.8MB)
C:\WINDOWS\assembly\NativeImages_v1.0.3705 (12MB)
C:\WINDOWS\assembly\GAC (13.5MB)
C:\Program Files\Reference Assemblies\ (Not created)
Microsoft .NET Runtime Just-In-Time Compiler - 1.0.3705.6018 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 7.0.9951.0 (VsaVb7rt.dll)
Microsoft JScript Engine - 7.0.9951.0 (Microsoft.JScript.dll)

.Net Framework redistributable version 1.1
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

Once the .Net Framework redistributable version 1.1 was installed I used Windows Update to install Net Framework Redistributable 1.1 SP1, reboot and run Windows Update again to install the Security Update for version 1.1 Service Pack 1 (KB928366)
Total disk space required = 88.99MB
Control Panel/ Add/Remove only shows: 16.13MB

File versions:
Microsoft .NET Runtime Just-In-Time Compiler - 1.1.4322.2407 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 7.10.6001.4 (VsaVb7rt.dll)
Microsoft JScript Engine - 7.10.6001.4 (Microsoft.JScript.dll)
Note: See part 2 of this article for additional details

.Net Framework redistributable version 2.0
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

Once the .Net Framework redistributable version 2.0 was installed I skipped Windows Update to install Net Framework Redistributable 2.0 SP1 and instead used the SP1 download file to install SP1. (Reboot - Not required)
Total disk space required = 158.2MB
Control Panel/ Add/Remove shows: 187MB

File versions:
Microsoft .NET Runtime Just-In-Time Compiler - 2.0.50727.1433 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 8.0.50727.1433 (VsaVb7rt.dll)
Microsoft JScript Engine - 8.0.50727.1433 (Microsoft.JScript.dll)

*Service Pack 2 updates a number of .NET files but the overall disk space usage in nearly the same at 159.0MB

*SP2 File versions:
Microsoft .NET Runtime Just-In-Time Compiler - 2.0.50727.3053 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 8.0.50727.3053 (VsaVb7rt.dll)
Microsoft JScript Engine - 8.0.50727.3053 (Microsoft.JScript.dll)

*Note: There is now a standalone download file for .Net Framework 2.0 Service Pack 2 (NetFx20SP2.exe).
http://www.microsoft.com/downloads/details.aspx?FamilyID=5b2c0358-915b-4eb5-9b1d-10e506da9d0f&displaylang=en
Microsoft has also included the 2.0 Framework SP2 as part of the 3.5 Framework SP1 install.

*Download the Family update:
http://www.microsoft.com/downloads/details.aspx?familyid=6c095bba-6100-4ec9-9c54-6450b0212565&displaylang=en&displaylang=en

*Note: Disregard the title of the article.
Scroll down the web page to the section titled: "Files in This Download"
32 Bit Windows download File is named = NDP20SP2-KB958481-x86.exe (8.6MB)

*After installing the Family Update:
Total disk space required = 155.6MB
Control Panel/ Add/Remove shows: 186MB

*Microsoft .NET Runtime Just-In-Time Compiler - 2.0.50727.3082 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 8.0.50727.3053 (VsaVb7rt.dll)
Microsoft JScript Engine - 8.0.50727.3053 (Microsoft.JScript.dll)


.Net Framework redistributable version 3.0
C:\WINDOWS\Microsoft.NET\Framework\v3.0

.NET Framework 3.0 redistributable Bootstrapper package (2.9MB) installs 3.0
by download the remaining 50MB of files using the internet during the installation process. You can also download the entire 50MB installation file to your hard driver and use it to install version 3. .Net 3.0 also includes .Net 2.0 as part of the installation process. Microsoft states that: "For customers that already have the .NET Framework 2.0 installed, this .NET Framework 3.0 redistributable package installs only the new Windows Vista components. This ensures that any .NET Framework 2.0-based applications work seamlessly when the .NET Framework 3.0 is installed, with no application migration or updates of any kind required."
 (60,452,110 bytes)

Once the .Net Framework redistributable version 3.0 was installed, I used Windows Update to install Net 2 SP1 and Net 3.0 SP1 (Reboot Required - No)
Total disk space required = 349.8MB
Control Panel / Add/Remove shows:
Framework 2.0 Service Pack 1 = 187MB
Framework 3.0 Service Pack 1 = 246MB

File versions:
Microsoft .NET Runtime Just-In-Time Compiler - 2.0.50727.1433 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 8.0.50727.1433 (VsaVb7rt.dll)
Microsoft JScript Engine - 8.0.50727.1433 (Microsoft.JScript.dll)

After using the Control Panel's Add/Remove to delete .Net 3.0 and 2.0 I checked the folders listed above and found a large number of files (224.6MB) were still present.
C:\WINDOWS\Microsoft.NET\Framework (22MB)
C:\WINDOWS\assembly (189MB)
C:\Program Files\Reference Assemblies\Microsoft\Framework (13.6MB)
So using Add/Remove did a poor job of removing the .Net files.

Using the Cleanup Tool mentioned earlier removed a number of orphaned registry entries and removed an additional 152MB, leaving 72.6MB of orphaned files still on the hard drive in the directories show below.

C:\WINDOWS\Microsoft.NET\Framework (532KB)
C:\WINDOWS\assembly (71.2MB)
C:\Program Files\Reference Assemblies\Microsoft\Framework (Empty)

.NET Framework 3.5 Redistributable
C:\WINDOWS\Microsoft.NET\Framework\v3.5

Version 3.5 contains many new features building incrementally upon .NET Framework 2.0 and 3.0, and includes .NET Framework 2.0 service pack 1 and .NET Framework 3.0 service pack 1. (Reboot Required - No)

.Net 3.5 SP1 is not available using Windows Update, so I installed SP1 using the download file. The .NET Framework 3.5 SP1 Redistributable also includes .NET Framework 2.0 SP2 and 3.0 SP2.  (Reboot Required - Yes)
Note: After rebooting wait about 2 minutes for mscorsvw.exe process to complete its task or until all hard disk activity has stopped.

Total disk space required = 415MB
Control Panel / Add/Remove shows:
Framework 2.0 Service Pack 2 = 186MB
Framework 3.0 Service Pack 2 = 168MB
Framework 3.5 SP1 = 29.13MB

File versions:
Microsoft .NET Runtime Just-In-Time Compiler - 2.0.50727.3053 (mscorjit.dll)
Microsoft Visual Basic Scripting Engine - 8.0.50727.3053 (VsaVb7rt.dll)
Microsoft® JScript Engine - 8.0.50727.3053 (Microsoft.JScript.dll)

Warning: There is a .NET Frameworks 2.0 SP2 and 3.0 SP2 bootstrapper package Installation. But it is only intended to be installed on machines with Visual Studio 2008 installed. http://msdn.microsoft.com/en-us/vs2008/bb898654.aspx


Conclusion:
The easiest way to determine how many versions of .Net are installed on your PC is to click on the Add or Remove Programs icon in the Control Panel.

If you are not a software developer and or do not have Microsoft's Visual Studio installed on your PC you should not see any .Net entries in the Add/Remove list that have the letters "SDK" as part of the name, as the "Software Development Kit" is for use by developers and as such takes up far more drive space that the "Redistributable" versions of .Net that most of use may have installed on our PC.


NET Framework - Disk space requirements, Part 2  > 


< Back