Failed to initialize the PowerShell host 解决方案
来源:互联网 发布:淘宝客不显示佣金 编辑:程序博客网 时间:2024/05/23 13:22
今日公司电脑完美升级到win10,用VS2013在创建新的MVC项目的时候,EF主程序引用不上,包括Mysql.data,包括所有的NuGet包,都不能自动安装,NuGet控制台也不可安装,提示信息如下:
Install failed. Rolling back... 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.
我意识到这是安装错误,但是不知道原因是什么,有可能是win10安装完成之后导致注册表变化,或者是没有管理员权限。
我尝试用当前用户,或得到相应目录的管理员权限,但是还不起作用。
结果尝试之后,得到了解决方案:
1.以管理员身份运行vs
2.打开程序包管理控制台。路径为:工具->NuGet程序包管理器->程序包管理控制台
3.命令 Get-ExecutionPolicy
4.命令 Set-ExecutionPolicy Unrestricted
5.命令 start-job { Set-ExecutionPolicy Unrestricted } -RunAs32 | wait-job | Receive-Job
运行完成之后就可以正常的使用NuGet了。
64位的话,要运行第5步,32位的话,截止到第4步即可。
整体解决方案的大意就是修改策略组。
Thanks ,End
0 0
- Failed to initialize the PowerShell host 解决方案
- Failed to create the host-only adapte
- Failed to initialize storage module: user 的解决方案
- Failed to initialize storage module: user 的解决方案
- failed to initialize HAL
- The application failed to initialize properly (0xc0000005):Google chrome
- BMXAA6539E - Failed to initialize the MAXIMOStartupServlet with exception: system#major
- samba 提示Failed to initialize the registry: WERR_CAN_NOT_COMPLETE 无法启动
- Failed to connect to the host via ssh: ssh: connect to host 192.68.1.75 port 22: No route to host
- SecureCRT failed to open the host key database file
- Failed to open the host key database file
- Failed to initialize Monitor Thread: Unable to establish loopback connection的错误解决方案
- Failed to initialize the ORB [Root exception is org.omg.CORBA.INITIALIZE: Unable to init plugins vm
- org.hibernate.LazyInitializationException: failed to lazily initialize a collection..的解决方案
- VirtualBox Host-only Adapter,Failed to create the host-only adapter
- 解决Failed to add the host to the list of known hosts
- Failed to add the host to the list of known hosts 问题解决
- VC8.0编译的程序出现The application failed to initialize properly (0xc0000005)
- JAVA中使用FTPClient上传下载
- 南邮 OJ 1184 迷失的邮票
- Win7(64Bit) 安装 PL/SQL Developer图解
- 如何用JUnit4测试spring service
- [Spark源码剖析] DAGScheduler划分stage
- Failed to initialize the PowerShell host 解决方案
- 实现点击AlertDialog上按钮时不关闭对话框
- hibernate3-二级缓存配制 EHCache实战
- 10个学习Android开发的网站推荐
- php无限分类根据顶类获取所有子类
- 阿里云盘亚马逊云盘的区别特性一览表
- 系统调用fcntl 和 ioctl
- 天声人語 20150805
- 奇葩错误