Once you have installed .NET 4.0 and/or Visual Studio 2010, you may notice that PowerShell and other .NET applications
still use the 2.0 runtime. To make them use the 4.0 runtime, add these values to the registry:
32-bit apps on a 32-bit operating system
64-bit apps on a 64-bit operating system
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"OnlyUseLatestCLR"=dword:00000001
32-bit apps on a 64-bit operating system
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework]
"OnlyUseLatestCLR"=dword:00000001
You do not need to reboot after adding/changing these values. Note that this change affects ALL .NET applications on the
machine. Before the change, opening a PowerShell prompt and executing: [Environment]::Version.ToString() returns
"2.0.50727.4927". After the change, it returns "4.0.30319.1".
Original discussion:
http://stackoverflow.com/questions/2094694/launch-powershell-under-net-4
Marco
"Chuck Heatherly" <chuck.h...@community.nospam> wrote in message
news:44nts55o82mvu5lp5...@4ax.com...