解決 error NETSDK1005 錯誤


錯誤訊息

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.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM