Although Microsoft .NET Framework is a user-space software, it is necessary to understand how to properly install the required version of Framework without breaking the operating system inside the container.
Generally, there are several ways to install Framework inside a container:
- REDIST : Install via an .msi package (redistributable) downloaded from the Microsoft website.
- FEATURE : Install via server roles and features (as of the release of Windows 2008).
- BUILT-IN : Some versions of .NET are built into the current version of Windows and so are present in containers by default. They MUST NOT be re-installed via .msi/redistributable package installation.
This table shows the proper way to install .NET Framework inside containers:
|.NET Framework version|
|Windows 2008 R2||REDIST||BUILT-IN||BUILT-IN||FEATURE||REDIST||REDIST|
Refer to this table to find the appropriate method of installing .NET Framework for your situation. For example, to install .NET Framework 3.5 on a Windows 2008 R2 Container, you need to add the .NET Framework feature to the Container:
C:\\>vzctl addrole CTID --role NET-Framework
If you install .NET Framework via a redistributable package, further OS updates related to the .NET Framework must be installed from inside the container. Installing .NET-related updates on the hardware node may corrupt containers with .NET.
Almost all versions of .NET Framework are backwards compatible. For example, version 4.0 includes versions 3.5, 3.0, and 2.0, etc. The only exception is version 1.1, which is not included in later versions and should be installed via the redistributable package if needed. It does not conflict with newer versions of .NET.
There is no need to install .NET Framework on a Hardware Node:
- 11220 Is it safe to install Microsoft .NET Framework on a Hardware Node?
.NET Framework Redistributable Download links: