Whenever I create a new MVC project, I am getting an error - failed to initialize Powershell host, for the entity framework and Jquery. The error: The following packages failed
Found a very easy solution.
The folder where the Solution file is located in needs to have the "read" only property unchecked when doing a right click on the solution folder in Windows Explorer.
Give the folder read / write permissions solve the issue for me :)
This problem is fairly common - as there are multiple links to the MSDN forums and references to the workaround. I tried troubleshooting with the Package Manager in Visual Studio and noticed that it was frozen - with a reference to looking for C:\Program Files (x86)\7-Zip\7z.exe. No idea why, but I checked my system and sure enough, I have 7z installed in the standard Program Files (not x86). I made a copy in the x86 folder, reloaded Visual Studio and Visual Studio is now happy again. Not sure why there is a dependancy on 7zip in the Visual Studio Package Manager - but hopefully this will help another programmer ...
None of the solutions here worked for me...not on one of my machines, at least.
For one of my machines, jrummell's answer worked perfectly, and I've not had any issues since; on my other machine, I had to follow the steps here: http://patrickdesjardins.com/blog/failed-to-initialize-the-powershell-host in order to stop the error from appearing.
For future searchers, if aSkywalker's solution isn't working for you, try running VS as administrator. That did it for me (and even more strangely, I haven't seen the error again since... I can't explain that).
One of the replies on the MSDN thread worked for me. Run PowerShell as an Administrator and run the following command:
Set-ExecutionPolicy AllSigned
See Using the Set-ExecutionPolicy Cmdlet for security implications.
I have VS2015 and this steps solved the problem for me
Tools > Extensions and Updates > Updates > Visual Studio Gallery > Nuget Package Manager : Update (this step needs to enter admin password)
restart VS
create new project