[英]How to fix error NETSDK1 project.assets.json file not found. Run a NuGet package restore to generate this file
I cannot run my new .netcore mvc application.我无法运行我的新 .netcore mvc 应用程序。 The dependencies always show warning icon.
依赖项总是显示警告图标。
And I got this error message when run my new asp.net mvc application运行我的新 asp.net mvc 应用程序时收到此错误消息
after a few hours of searching, I got a few answers.
经过几个小时的搜索,我得到了一些答案。 but the answer still cannot be applied to run my application.
但答案仍然无法应用于运行我的应用程序。 I have tried using
dotnet restore
, nuget restore
, dotnet build
, etc. but still no one solved this problem.我曾尝试使用
dotnet restore
、 nuget restore
、 dotnet build
等,但仍然没有人解决这个问题。 when I run dotnet restore
this message appears当我运行
dotnet restore
出现此消息
when I run nuget restore
this message appears当我运行
nuget restore
出现此消息
Previously I used Microsoft Visual Studio 2017. I uninstalled it and replaced it with Microsoft Visual Studio 2019. Was there something conflict when I installed Microsoft Visual Studio 2019?之前我用的是Microsoft Visual Studio 2017,卸载了,换成了Microsoft Visual Studio 2019,安装Microsoft Visual Studio 2019时有冲突吗?
I just want to run my application.我只想运行我的应用程序。 but I don't know what's wrong with my application?
但我不知道我的申请有什么问题?
Hopefully some of you can help me.希望你们中的一些人可以帮助我。 Thank you in advance
先感谢您
In order to fix this error, open visual studio, then select Tools > NuGet Package Manager > Package Manager Console.要修复此错误,请打开 Visual Studio,然后选择“工具”>“NuGet 包管理器”>“包管理器控制台”。 Once the Package Manager Console window is open, simply type the below command press enter button.
打开包管理器控制台窗口后,只需键入以下命令按回车键。
dotnet restore dotnet 还原
dotnet restore {Directory of Solution}{Name of the solution} dotnet restore {解决方案目录}{解决方案名称}
Hit Enter按回车键
It will work, restore all the nuget packages/dependencies它将起作用,恢复所有 nuget 包/依赖项
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.