【发布时间】:2023-04-01 15:13:01
【问题描述】:
我们正在构建一个 ASP.NET Core 解决方案,并且我们最近在该解决方案中添加了一个 NodeJS 项目。现在当我们运行 CI 时,它给出了这个错误:
error MSB4019: The imported project "/usr/share/dotnet/sdk/3.1.201/Microsoft/VisualStudio/v16.0/Node.js Tools/Microsoft.NodejsToolsV2.targets" was not found. Confirm that the expression in the Import declaration "/usr/share/dotnet/sdk/3.1.201/Microsoft/VisualStudio/v16.0/Node.js Tools/Microsoft.NodejsToolsV2.targets" is correct, and that the file exists on disk.
这是有道理的,因为我们在任何时候都没有安装“NodeJS 工具”,但我们找不到如何安装这些工具。如何使用 dotnet cli 安装 NodeJS 工具?
【问题讨论】:
-
你看过this吗?
-
我可能有,但我们只是在构建时忽略了 Node 项目,只是手动使用终端作为快速修复,并且从未真正回头。我问这个是为了我们夏天做的一个学校项目,我不再做这个了。感谢您的帮助。
标签: node.js .net msbuild continuous-integration gitlab