EntityFramework.6.1.2-β1\\工具\\ init.ps1受到限制,无法运行支持的迁移命令 [英] EntityFramework.6.1.2-beta1\tools\init.ps1 is restricted, cannot run enable-migrations Command

查看:923
本文介绍了EntityFramework.6.1.2-β1\\工具\\ init.ps1受到限制,无法运行支持的迁移命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的Visual Studio 2013的C#ASP.NET MVC问题EntityFramework.6.1.2-β1\\ TOOLS \\ init.ps1无法加载,因为它的执行是由软件限制策略阻止。欲了解更多信息,请联系您的系统管理员。

当我尝试使用Enable-迁移:我得到以下信息:
术语启用的迁移'未被识别为cmdlet,函数,脚本文件或可操作的程序的名称。检查SPE
名字的灌装,或是否包含路径,验证路径是否正确,然后再试一次。
在行:1字符:18
+启用的迁移<<<<
    + CategoryInfo:ObjectNotFound:(启用的迁移:字符串)[],CommandNotFoundException
    + FullyQualifiedErrorId:CommandNotFoundException

When I try to use the Enable-Migrations: I get the message below: The term 'Enable-Migrations' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spe lling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:18 + Enable-Migrations <<<< + CategoryInfo : ObjectNotFound: (Enable-Migrations:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

我有以上的问题,我试过各种解决方案的,但他们没有帮助

I have the above Issue, and I tried all sorts of solutions for it, but none of them helped

这是我已经做了的事情:
1.删​​除了所有的Nu​​Get延伸,并再次安装了它(没有工作)
2.删除实体框架,并再次重新安装它(没有工作)
3.closed我的Visual Studio 2013,并重新打开该文件(没有工作)
使用管理员4.打开Visual Studio中(没有工作)
5.删除整个包从一个不同的项目(没有工作)

Things that I have already done: 1. removed all nuget extention and installed it Again (Didn't Work) 2. Removed Entity Framework and reinstalled it again (Didn't Work) 3.closed my visual studio 2013 and reopened the file (Didn't Work) 4. Opened visual studio using Administrator (Didn't Work) 5. Deleted the whole package brought package from a different project (Didn't Work)

我甚至尝试了一些电源外壳命令,仍然无法正常工作。

I even tried some power shell commands, still does not work..

找到了我的解决方案:

我找到了解决我的问题。原因是,我的用户配置文件在某种程度上运行的EntityFramework的init.ps1文件阻止我。我创建了一个新的用户配置文件,具有管理员权限,并运行在该配置文件的Visual Studio,现在的EntityFramework,完美的作品。柜面,如果你有同样的问题,试试上面的东西,我已经试过了,如果没有他们的工作,那么试试这个..

I found the solution to my problem. The reason was that, my user-profile was somehow blocking me from running the init.ps1 file of EntityFramework. I created a new user profile, with admin rights, and Ran Visual Studio on that profile, and now the EntityFramework, works perfectly. Incase if you have the same problem, try the above, stuff that I have already tried, and if none of them work, then try this..

好运

推荐答案

我找到了解决我的问题。
原因是,我的用户配置文件在某种程度上运行的EntityFramework的init.ps1文件阻止我。
我创建了一个新的用户配置文件,具有管理员权限,并运行在该配置文件的Visual Studio,现在的EntityFramework,完美的作品。
柜面,如果你有同样的问题,试试上面的东西,我已经试过了,如果没有他们的工作,那么试试这个..

I found the solution to my problem. The reason was that, my user-profile was somehow blocking me from running the init.ps1 file of EntityFramework. I created a new user profile, with admin rights, and Ran Visual Studio on that profile, and now the EntityFramework, works perfectly. Incase if you have the same problem, try the above, stuff that I have already tried, and if none of them work, then try this..

好运

这篇关于EntityFramework.6.1.2-β1\\工具\\ init.ps1受到限制,无法运行支持的迁移命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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