找不到资产文件project.assets.json。运行NuGet软件包还原 [英] Assets file project.assets.json not found. Run a NuGet package restore
问题描述
我正在尝试使用nopCommerce(这是用.NET Core编写的),但是当我想运行项目时,我遇到52个错误,告诉我运行nuget包还原
I'm trying to use nopCommerce(Which is written in .NET Core) but when I want to run the project I face 52 Errors telling me Run a nuget package restore
资产文件〜\obj\project。 assets.json'。运行NuGet软件包还原以生成此文件。 Nop.Web.MVC.Testsote
Assets file ~\obj\project.assets.json' not found. Run a NuGet package restore to generate this file. Nop.Web.MVC.Testsote
当我右键单击解决方案并选择Restore Nuget Packages时,我收到此消息:
when I use the right click on the solution and selecting Restore Nuget Packages I get this message:
所有软件包都已安装,无法还原。
All packages are already installed and there is nothing to restore.
,但那52个错误仍然存在,并且在 工具-> NuGet程序包管理器->管理解决方案的NuGet程序包 中,解决方案上没有安装任何东西,我最近也将我的VS2017更新到15.5.4
but those 52 Errors are still there and in Tools -> NuGet Package Manager -> Manage NuGet Packages for Solution there is nothing installed on the solution,also I Recently updated my VS2017 to 15.5.4
推荐答案
要通过工具> NuGet软件包管理器>软件包管理器控制台简单地解决此错误运行:
To fix this error from Tools > NuGet Package Manager > Package Manager Console simply run:
dotnet restore
发生错误是因为dotnet cli最初并未创建所有必需的文件。进行dotnet还原会添加所需的文件。
The error occurs because the dotnet cli does not create the all of the required files initially. Doing dotnet restore adds the required files.
这篇关于找不到资产文件project.assets.json。运行NuGet软件包还原的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!