Managing .NET installations across enterprise environments often leads to version conflicts. Through WSUS deployments over years, we frequently encounter situations where multiple .NET installations interfere with each other, particularly with security updates failing to apply properly.
// Practical compatibility test
try {
var legacyAssembly = Assembly.Load("OldLibrary, Version=1.0.0.0");
Console.WriteLine("Legacy assembly loaded successfully on .NET 3.5");
} catch (Exception ex) {
Console.WriteLine($"Compatibility issue: {ex.Message}");
}
While Microsoft claims backward compatibility between major .NET Framework versions, real-world scenarios reveal exceptions:
- In-place upgrades don't always clean up previous versions completely
- Some security updates specifically target older runtime versions
- Registry settings and GAC registrations may conflict
The .NET cleanup tool followed by fresh .NET 3.5 installation often resolves issues because:
- It removes all residual registry entries
- Clears the Global Assembly Cache (GAC) of conflicting versions
- Provides a clean foundation for security updates
Consider maintaining older .NET versions if your environment has:
// App.config showing version-specific binding
Legacy application dependencies that specifically require:
- Hard-coded assembly bindings to older versions
- COM interop components built against specific runtimes
- Third-party libraries with version-specific dependencies
For reliable .NET deployments via WSUS:
- Always test major .NET updates on pilot machines
- Use the .NET Setup Verification Tool post-installation
- Monitor application event logs for binding failures
- Consider deploying .NET versions as standalone packages rather than updates
When multiple versions are necessary, properly configure them using:
// Example of runtime settings in app.config
When managing enterprise systems, understanding .NET version compatibility is crucial for system stability and security. The .NET framework has evolved through multiple versions, each building upon its predecessors while introducing new features and improvements.
.NET maintains backward compatibility through these fundamental approaches:
- In-place updates for minor versions (e.g., 4.5 → 4.6)
- Side-by-side installation for major versions (e.g., 3.5 and 4.x)
- Forward compatibility patches for security updates
Consider this common PowerShell script to check installed .NET versions:
Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP' -Recurse |
Get-ItemProperty -Name Version -EA 0 |
Where { $_.PSChildName -match '^(?!S)\p{L}'} |
Select PSChildName, Version
The WSUS deployment issues often stem from:
- Conflicting registry entries between versions
- Incomplete installation of prerequisite components
- File version mismatches in the GAC
The .NET cleanup tool followed by 3.5 reinstallation works because:
- It removes all conflicting registry entries
- Cleans up the Windows Installer database
- Provides a fresh start for the installation chain
For most modern applications targeting .NET 3.5:
While .NET 3.5 generally supersedes older versions, maintain older installations when:
- Legacy applications have hard dependencies
- Custom assemblies were compiled against specific runtime versions
- System components require original .NET 1.1 assemblies
Implement this PowerShell function for ongoing maintenance:
function Repair-NETInstallation {
param([string]$Version = "3.5")
# Remove existing installations
Start-Process "dotnetfx_cleanup_tool.exe" -ArgumentList "/q" -Wait
# Reinstall specified version
$source = "\\wsus\packages\dotnet$Version"
$args = "/q /norestart /log C:\Windows\Temp\dotnet_install.log"
Start-Process "$source\setup.exe" -ArgumentList $args -Wait
# Verify installation
return (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v$Version" -ErrorAction SilentlyContinue)
}