Windows Vista Forums

Getting PowerShell to use .NET 4.0 runtime

  1. #1


    Chuck Heatherly Guest

    Getting PowerShell to use .NET 4.0 runtime


    (Reposted from a Stack Overflow discussion, I just verified that the tip works.)

    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/2...ll-under-net-4

      My System SpecsSystem Spec

  2.   


  3. #2


    Marco Shaw [MVP] Guest

    Re: Getting PowerShell to use .NET 4.0 runtime

    Thanks for the tip...

    Marco

    "Chuck Heatherly" <chuck.heatherly@newsgroup> wrote in message
    news:44nts55o82mvu5lp5cinq2pt1g60n171bf@newsgroup

    >
    > (Reposted from a Stack Overflow discussion, I just verified that the tip
    > works.)
    >
    > 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/2...ll-under-net-4

      My System SpecsSystem Spec


Getting PowerShell to use .NET 4.0 runtime
Similar Threads
Thread Forum
What's the differeces between these codes in powershell runtime ? PowerShell
Microsoft Visual C++ Runtime Library box with Runtime Error Vista General
Microsoft Visual C++ Runtime Library ...Runtime Error Vista mail
PowerShell installation failed -- PSCustomSetupUtil.exe runtime er PowerShell
Installation Error: Visual C++ Runtime Linrary Runtime Error Vista installation & setup