我在Ubuntu服务器上安装了dotnet-ef工具,并且安装成功。但是,仍然没有找到该程序:
~/app$ dotnet --version
3.1.201
~/app$ dotnet tool install --global dotnet-ef --version 3.1.3
Since you just installed the .NET Core SDK, you will need to logout or restart your session before running the tool you installed.
You can invoke the tool usi
我想使用.NET核心实体框架。但是由于一个错误,我不能: dotnet ef
The application to execute does not exist:
'C:\Users\Curso\.dotnet\tools\.store\dotnet-ef\2.1.14-servicing-32113\dotnet-ef\2.1.14-servicing-32113\tools\netcoreapp2.1\any\dotnet-ef.dll'. ? ?
我确实使用以下命令安装了dotnet
dotnet tool install --global dotnet-ef
它回来了
Tool 'dotnet-ef' is already installed.
我假定它已正确安装。
在我的项目中运行下面的命令时
dotnet ef migrations add InitialMigration
它回来了
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You mis
我一直在不同的操作系统上测试dotnet 3,如Linux(Ubuntu).、、Windows、他们都和EF核心合作得很好!
然而,我决定给一个机会,看看它是如何工作的。所以我才来这里!
WSL和Ubuntu18.04的问题是:
我在全球安装了EF Core并重新启动了终端。*到目前为止,EF版本为3.1.4
> dotnet tool install --global dotnet-ef
当我尝试运行任何dotnet ef命令时,我会得到以下错误:
> dotnet ef database update
Could not execute because the specif
我的系统是:Ubuntu20.04。zsh+ohmyzsh终止符kde
最近,当我想运行dotnet-ef migrations add Add_Minor_Fields时,我得到:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dot
我正在从一个DotNetCore2.0 WebApp构建一个码头容器,它是与dotnet publish一起打包的,但是以这种方式发布并不会在Microsoft.EntityFrameworkCore.Tools.DotNet中复制支持dotnet-ef命令的扩展。
具体来说,我想在容器中运行dotnet ef命令,但是我得到了以下错误:
No executable found matching command "dotnet-ef"
我的.csproj文件包含此内容,因此dotnet-ef在主机上工作正常:
<DotNetCliToolReference Include
在我的Web项目中升级到.Net Core3.1之后,我尝试了以下常见的ef命令-
dotnet ef
Got:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-ef does not exist.
* You in
❯ dotnet ef
A fatal error occurred. The required library libhostfxr.so could not be found.
If this is a self-contained application, that library should exist in [/home/ru/.dotnet/tools/.store/dotnet-ef/6.0.2/dotnet-ef/6.0.2/tools/netcoreapp3.1/any/].
If this is a framework-dependent application,
我试图通过dotnet安装dotnet工具。
我输入的命令: dotnet工具安装--全局dotnet-ef
它给出了以下错误:
C:\Users\%USERNAME%\AppData\Local\Temp\147383a8-b714-4336-bb96-30c0670ea37d\restore.csproj : error NU1211: Project res
tore must have a single package reference(s).
C:\Users\abby.rahimi\AppData\Local\Temp\147383a8-b714-4336-bb96-30c
在发布概要文件中,Visual和EF迁移的情况非常奇怪。给予:
2019 v16.4
.NET核心项目。目标.NET核心3.1
EF 3.1
Azure出版简介
我在本地项目中创建了迁移,在尝试枚举发布概要文件中的迁移时,我得到
Run dotnet tool restore to make the dotnet-ef command available
我不知道这个错误意味着什么,因为似乎安装了dotnet工具:
PM> dotnet --version
3.1.101
PM> dotnet ef --version
Entity Framewo
我正在用wsl2编写.net核心5中的一个应用程序接口,并且遵循所有文档来安装实体框架核心工具。 当我跑的时候 dotnet tool list -g 它打印出来 Package Id Version Commands
--------------------------------------
dotnet-ef 5.0.7 dotnet-ef 但是当我跑的时候 dotnet ef 或者它的任何子命令,我得到了这个 Could not execute because the specified command or file was not f
我正在尝试在docker上运行我用asp.net核心3.1编写的应用程序。我需要使用迁移创建数据库。在执行dotnet ef database update;命令时,我得到:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-ef d
我有这样的移民:
00000000000000_First
20161101000000_Foo
20161102000000_Bar
// ...many many MANY more
20161108000000_Baz
我想将Foo到Baz合并成一个新的迁移。我知道如何在EF,但不是在EF核心。
我试过这个:
dotnet ef update database 00000000000000_First
// delete all other migration classes
dotnet ef migrations add Consolidated
dotnet ef update
我
当我尝试在Azure Devops中构建应用程序时,我总是遇到这个错误
The framework 'Microsoft.NETCore.App', version '3.1.0' (x64) was not found.
在执行ef迁移时,即使它是完全的net6 ( ef核心的nuget包也是6.0 )。
但是,有一个代理已被DotNet3.1SDK污染,该代理生成以下消息:
The Entity Framework tools version '3.1.0' is older than that of the runtime '6.
如果我运行dotnet ef add testmigration
我收到这样的警告:The EF Core tools version '2.1.0-rtm-30799' is older than that of the runtime '2.1.1-rtm-30846'. Update the tools for the latest features and bug fixes.
所以我检查了我的csproj文件:
<ItemGroup>
<PackageReference Include="Microsoft.Entit
当我试图在我的ASP.NET Core3.1MVC项目中创建一个迁移时,我得到了这个错误--我需要帮助
Build started...
Build succeeded.
You must install or update .NET to run this application.
App: /Users/remzi/.dotnet/tools/.store/dotnet-ef/6.0.7/dotnet-ef/6.0.7/tools/net6.0/any/tools/netcoreapp2.0/any/ef.dll
Architecture: arm64
Framework: 'M
我试图使用命令dotnet ef migrations script,以便在上一次应用迁移和最后一次未应用的迁移之间创建一个SQL脚本。应用程序迁移被称为dotnet ef database update。
我尝试执行以下命令,但这些命令都没有工作:
dotnet ef --startup-project ../DbMigrations/ migrations script from LastAppliedMigration to LastNotAppliedMigration -o temp.sql --context MyProject.DbModel.MusicDbContext
d
正在尝试使用Package Manager控制台中的"dotnet ef“命令。PMC是.csproj目录的cd命令,但仍收到以下命令: dotnet : Specify which project file to use because this 'C:\Users\PC-NAME\Source\Repos\TestProject\Test" contains more than one project file.
At line:1 char:1
dotnet ef migrations add TestMigration
+ CategoryInfo