在完整的 .NET 项目 (*.csproj) 中启用 EF Core 迁移 [英] Enable EF Core Migration in Full .NET Project (*.csproj)

查看:20
本文介绍了在完整的 .NET 项目 (*.csproj) 中启用 EF Core 迁移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个完整的 .NET Framework 项目 (*.csproj),可以访问 EF Core 数据.

I have a full .NET Framework project (*.csproj) with EF Core data access.

如何在非 .NET-Core 项目 (ASP.NET MVC5) 中为 EF Core 启用迁移?

How can I have migrations enabled for EF Core in Non-.NET-Core projects (ASP.NET MVC5)?

我收到以下错误:

dotnet : No executable found matching command "dotnet-ef"

推荐答案

EF Core Tools 的 1.0.0-preview2 和 1.0.0-preview1 版本不适用于 csproj 项目,仅适用于 project.json.请改用包管理器控制台命令.请参阅 https://docs.efproject.net/en/latest/miscellaneous/cli/powershell.html

The 1.0.0-preview2 and 1.0.0-preview1 releases of EF Core Tools don't work on csproj projects, only project.json. Use the Package Manager Console commands instead. See https://docs.efproject.net/en/latest/miscellaneous/cli/powershell.html

这篇关于在完整的 .NET 项目 (*.csproj) 中启用 EF Core 迁移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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