错误创建新的MVC项目 - EF和JQuery [英] Error creating new MVC project - EF and JQuery

查看:135
本文介绍了错误创建新的MVC项目 - EF和JQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我创建一个新的MVC项目,我得到一个错误 - 初始化失败PowerShell主机,为实体框架和jQuery。
错误:
下面的包无法从安装'C:\\ Program Files文件\\微软ASP.NET \\ ASP.NET MVC 4 \\包

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 to install from 'C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 4\Packages'

EntityFramework.5.0.0:无法初始化PowerShell主机。如果你的PowerShell执行策略设置为使用AllSigned,打开包管理器控制台首先初始化主机。

EntityFramework.5.0.0: Failed to initialize the Powershell host. If your powershell execution policy setting is set to AllSigned, open the package manager console to initialize the host first.

jQuery.1.7.1.1:无法初始化PowerShell主机。如果你的PowerShell执行策略设置为使用AllSigned,打开包管理器控制台首先初始化主机。

jQuery.1.7.1.1: Failed to initialize the Powershell host. If your powershell execution policy setting is set to AllSigned, open the package manager console to initialize the host first.

我可以删除实体框架参考,并手动添加它,这是一个很好的解决办法,但它很讨厌和地方的一些问题的征兆。任何想法去哪里找?

I can remove the Entity Framework reference, and add it manually, which is a good workaround, but it is annoying and a sign of some problem somewhere. Any ideas where to look?

此链接记录了类似的问题和解决方法:
<一href=\"http://social.msdn.microsoft.com/Forums/en/vssetup/thread/c934fed4-e44e-4a06-9e3b-eccb9c8aa8d6\">http://social.msdn.microsoft.com/Forums/en/vssetup/thread/c934fed4-e44e-4a06-9e3b-eccb9c8aa8d6

This link documents a similar problem and workaround: http://social.msdn.microsoft.com/Forums/en/vssetup/thread/c934fed4-e44e-4a06-9e3b-eccb9c8aa8d6

推荐答案

其中MSDN线程的答复为我工作。运行PowerShell中以管理员身份运行以下命令:

One of the replies on the MSDN thread worked for me. Run PowerShell as an Administrator and run the following command:

Set-ExecutionPolicy AllSigned

请参阅使用Set-ExecutionPolicy cmdlet来的安全问题。

这篇关于错误创建新的MVC项目 - EF和JQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆