错误讯息

error NETSDK1005: Assets file '...\obj\project.assets.json' doesn't have a target for 'net50'. Ensure that restore has run and that you have included 'net50' in the TargetFrameworks for your project.

删除旧版本

> dotnet tool uninstall --global dotnet-ef
Tool 'dotnet-ef' (version '3.1.4') was successfully uninstalled.
> dotnet tool uninstall --global dotnet-aspnet-codegenerator
Tool 'dotnet-aspnet-codegenerator' (version '3.1.4') was successfully uninstalled.

安装新版本

> dotnet tool install --global dotnet-ef
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '5.0.0') was successfully installed.
> dotnet tool install --global dotnet-aspnet-codegenerator
You can invoke the tool using the following command: dotnet-aspnet-codegenerator
Tool 'dotnet-aspnet-codegenerator' (version '5.0.0') was successfully installed.

相关文章:

  • 2021-08-17
  • 2021-07-27
  • 2021-10-05
  • 2021-08-24
  • 2021-04-06
  • 2022-03-05
  • 2022-01-14
  • 2021-09-20
猜你喜欢
  • 2022-12-23
  • 2021-09-26
  • 2021-09-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2022-02-17
相关资源
相似解决方案