简体   繁体   English

一直在尝试使用 C# 在 ASP.NET MVC 中将迁移添加到我的项目中,但出现这些错误

[英]Have been trying to add migration to my project in ASP.NET MVC using C# but am getting these errors

Could not execute because the specified command or file was not found.由于找不到指定的命令或文件,无法执行。

Possible reasons for this include:可能的原因包括:

  • You misspelled a built-in dotnet command.您拼错了内置的 dotnet 命令。
  • You intended to execute a .NET program, but dotnet-ef does not exist.您打算执行一个 .NET 程序,但 dotnet-ef 不存在。
  • You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.您打算运行一个全局工具,但在 PATH 上找不到具有此名称的带 dotnet 前缀的可执行文件。

Do you use VSCode on linux ?你在 linux 上使用 VSCode 吗? If this is the case, you have to add the dotnet/tools path.如果是这种情况,您必须添加 dotnet/tools 路径。 You can also check if your tool is in the folder.您还可以检查您的工具是否在文件夹中。

export PATH="$PATH:$HOME/.dotnet/tools"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我没有使用c#在我的asp.net应用程序中获取.csv文件? - why i am not getting the .csv file in my asp.net application using c#? 使用 c# ASP.NET MVC 获取视频播放 - Getting Video To play using c# ASP.NET MVC 在新的VS Studio 2017 ASP.NET MVC 5.2.3项目中使用C#7功能时编译错误 - Compile errors when using C# 7 features in new VS Studio 2017 ASP.NET MVC 5.2.3 project 尝试使用EF7向我的Asp.net5项目添加迁移 - Trying to add migration to my Asp.net5 project with EF7 我正在尝试在 asp.net c# 中使用 google API 发送 email 并收到错误 400 redirect_uri_mismatch - I am trying to send email using google API in asp.net c# and getting Error 400 redirect_uri_mismatch 尝试在 gridview 中编辑行(C# ASP.NET MVC) - Trying to edit row in a gridview (C# ASP.NET MVC) 无法使用 add-migration 在 Asp.Net Mvc 项目中添加迁移? - Not able to add migration in the Asp .Net Mvc Project using add-migration? 在使用ASP.NET MVC / C#/ SQL进行的“投票”实现中,我是否忽略了任何内容? - Am I overlooking anything in this “voting” implementation using ASP.NET MVC/C#/SQL? 我正在尝试使用c#从asp.net页执行ar脚本,但未执行 - i am trying to execute a r script from asp.net page using c# but it's not executing 我正在尝试使用asp.net C#每月自动填充报告 - I am trying to auto populate the report monthly using asp.net c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM