Getting PowerShell to use .NET 4.0 runtime


  1.    21 Apr 2010 #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.    08 May 2010 #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
runtime error 0/runtime error 440 automation
I have two user accounts on my Windows Vista home basic. I installed Malwarebytes Anti-Malware early this afternoon. Works fine on my account, but...
General Discussion
What's the differeces between these codes in powershell runtime ?
**********************C++/CLI Code******************* *****Failed At :...
PowerShell
Microsoft Visual C++ Runtime Library box with Runtime Error
I loaded MapCreate on my computer and I have an error message appearing. It a Microsoft Visual C++ Runtime Library box with Runtime Error..Program:...
Vista General
Microsoft Visual C++ Runtime Library ...Runtime Error
I got an rutnime error message while I open WinMail. Microsoft Visula C++ Runtime Library Runtime Error! Program C:\Program Files\Windows...
Vista mail
PowerShell installation failed -- PSCustomSetupUtil.exe runtime er
Hi msft, I tried to install PowerShell v1.0 on Windows 2K3 SP2. I received the following error message. Now I can't install it, nor can I...
PowerShell
Installation Error: Visual C++ Runtime Linrary Runtime Error
When ever I try to instal Vista, I get to the checking compatability stage on upgrade. And then it comes up with the message: "Runtime Error!...
Vista installation & setup
How to refrence System.Workflow.Runtime.Messaging and System.Workflow.Runtime.Hosting.Web
Hi, I want to use System.Workflow.Runtime.Messaging and System.Workflow.Runtime.Hosting.Web in Classes but i m not getting the references... the...
Avalon

Our Sites
  • Ten Forums
  • Eight Forums
  • Seven Forums
  • Help Me Bake
  • Site Links
  • Contact Us
  • Privacy and Cookies
  • About Us
    Windows Vista Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

    Designer Media Ltd
    All times are GMT -5. The time now is 11:19.
    .