BeF*_*oRE 7 .net msbuild continuous-integration node.js gitlab
我们正在构建一个 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.
Run Code Online (Sandbox Code Playgroud)
这是有道理的,因为我们在任何时候都没有安装“NodeJS 工具”,但我们找不到如何安装这些工具。如何使用 dotnet cli 安装 NodeJS 工具?
CLIdotnet无法构建这些项目,因为这些项目所需的工具是 Visual Studio 的一部分,而不是 .NET Core 发行版或 .NET Sdk 支持的工作负载。
虽然您仍然可以dotnet在 .NET Core/Standard csproj 文件上使用 CLI,但不能在包含 CLI 不支持的项目的解决方案文件上使用它。
但是,您可以msbuild.exe在所有项目上使用 Visual Studio 安装中的命令(建议使用 VS 开发人员命令提示符),例如:
dotnet build foo.sln=>msbuild -restore foo.sln
| 归档时间: |
|
| 查看次数: |
2787 次 |
| 最近记录: |