Why does ExecutionPolicy behavior vary across projects in Visual Studio?

后端 未结 8 626
挽巷
挽巷 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:39

    I'm having this issue now, i think what worked for me easy was that i just had to restart visual studio 2013 and run it as administrator...worked fast for me.

    0 讨论(0)
  • 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.

    0 讨论(0)
提交回复
热议问题