简体   繁体   中英

PowerShell not running after Visual Studio 2015 install

I've just updated from Visual Studio 2012 to 2015. Looks like this bumped the .NET version numbers from 4.0.31309 to 4.6.0081 (running under Windows 7).

However, our project runs a number of PowerShell scripts. After the upgrade, attempting to run PowerShell gave me an error that it couldn't run because it needed .NET version 4.6.0081.

That makes no sense. That version is now installed on my computer. Why would it say I need it?

So I decided to upgrade PowerShell by installing the Windows Management Framework 4.0 . After which, I now get an error saying that it couldn't run because it needs .NET version 4.0.31309.

What the heck is going on here?

This is likely caused by a missing registry key:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework]
"InstallRoot"="C:\\Windows\\Microsoft.NET\\Framework64\\"

PowerShell will not start

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM