Error creating new MVC project - EF and JQuery

后端 未结 6 869
一整个雨季
一整个雨季 2021-02-18 19:28

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

相关标签:
6条回答
  • 2021-02-18 20:06

    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 :)

    0 讨论(0)
  • 2021-02-18 20:07

    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 ...

    0 讨论(0)
  • 2021-02-18 20:08

    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.

    0 讨论(0)
  • 2021-02-18 20:14

    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).

    0 讨论(0)
  • 2021-02-18 20:17

    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.

    0 讨论(0)
  • 2021-02-18 20:23

    I have VS2015 and this steps solved the problem for me

    1. Tools > Extensions and Updates > Updates > Visual Studio Gallery > Nuget Package Manager : Update (this step needs to enter admin password)

    2. restart VS

    3. create new project

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