VS error while creating a new WebAPI project
When I create a new WebAPI (MVC4) project I get the following error.
EntityFramework.5.0.0: Failed to initialize Powershell host. If the PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.
jQuery.1.7.1.1: Failed to initialize Powershell host. If the PowerShell execution policy setting is set to AllSigned, open the Package Manager Console to initialize the host first.
After Googling I found several answers, but nothing seems to work.
Error while creating new MVC project - EF and JQuery This answer seems like it should work for me as my last project was a 7z command line application and I might have done something stupid with 7zip. But I copied the 7-Zip directory from Program Files to Program Files (86) with no luck.
http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/c934fed4-e44e-4a06-9e3b-eccb9c8aa8d6 There is an answer here that might work (I haven't tried it) but even if it works, I wouldn't want to do this every time I create a new project.
Can anyone help me with this?
source to share
I ran into a similar error by launching PowerShell as Administrator with a command Set-ExecutionPolicy Unrestricted
, restarting Visual Studio and opening the Package Manager Console before what I wanted to do.
Make sure you understand the security implications for this in the first place.
http://technet.microsoft.com/en-us/library/ee176961.aspx
- Limited . No scripts can be run. Windows PowerShell can only be used in interactive mode.
- AllSigned . Only scripts signed by a trusted publisher can run.
- RemoteSigned . Downloaded scripts must be signed by a trusted publisher before running them.
- Unlimited - no restrictions; all Windows PowerShell scripts can be run.
source to share