Why does ExecutionPolicy behavior vary across projects in Visual Studio?

后端 未结 8 660
挽巷
挽巷 2020-12-07 12:46

I have been using NuGet for quite some time on a particular PC. Now, I created a new project in VS2010 (it\'s an MVC 4 Beta project using the Single Page App template if th

8条回答
  •  忘掉有多难
    2020-12-07 13:41

    Another way to fix this is by merging a Regedit file with the following content:

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
    "ExecutionPolicy"="Unrestricted"
    
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell]
    "ExecutionPolicy"="Unrestricted"
    

    (Create a text file called NuGetPowerShellFix.txt, copy paste the above into it, rename to NuGetPowerShellFix.reg, then run.)


    After merging the above file, restart Visual Studio.

提交回复
热议问题