无法设置当前堆栈帧

时间:2015-02-26 06:59:04

标签: c# asp.net asp.net-core-mvc entity-framework-core

我在Visual Studio 2015 CTP中打开了命令窗口,并给出了以下命令

>k ef migration add [migration name]
>k ef migration apply

它将回复消息显示为Unable to set the current stack frame.

如何解决上述问题。

我正在为挂起的模型更改提供新的迁移,并从命令行将它们应用到数据库。

我正在关注 View components and Inject in ASP.NET MVC 6

2 个答案:

答案 0 :(得分:0)

在管理员命令窗口中,将目录更改为项目目录。项目目录包含project.json文件。

然后从那里运行命令。 简而言之,不要使用可视命令窗口,而是使用实际的Windows命令窗口。

答案 1 :(得分:0)

您应该按照以下步骤安装K命令:

安装K版本管理器(KVM)

Open a command prompt with Run as administrator.
Run the following command:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"

The script installs KVM for the current user.
Exit the command prompt window and start another as an administrator (you need to start a new command prompt to get the updated path environment).
Upgrade KVM with the following command:
KVM upgrade
You are now ready to run EF migrations.

来源是您的共享链接"View components and Inject in ASP.NET MVC 6"

您需要在cmd.exe上运行命令

相关问题