我有一个 ASPNET Core 3.1 MVC Web 应用程序。我在项目中添加了一个 .SCSS 文件,并在构建项目时安装了WebCompiler Visual Studio 扩展来编译 SCSS 文件。我已启用自定义构建步骤,以便运行dotnet build
将运行 WebCompiler 并生成.css
输出文件。
我现在正在尝试通过 Github Actions 自动执行此操作,并且 WebCompiler 在构建过程中失败:
Microsoft (R) Build Engine version 16.4.0+e901037fe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.
Restore completed in 5.66 sec for /home/runner/work/ndc-expo/ndc-expo/project.csproj.
WebCompiler: Begin compiling compilerconfig.json
WebCompiler installing updated versions of the compilers...
/home/runner/.nuget/packages/buildwebcompiler/1.12.394/build/BuildWebCompiler.targets(12,9):
error : No such file or directory [/home/runner/work/ndc-expo/ndc-expo/project.csproj]
Build FAILED.
/home/runner/.nuget/packages/buildwebcompiler/1.12.394/build/BuildWebCompiler.targets(12,9):
error : No such file or directory [/home/runner/work/ndc-expo/ndc-expo/project.csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:07.57
##[error]Process completed with exit code 1.
尝试在本地复制构建(带有 dotnet sdk 3.1 的 Ubuntu 20.04)会产生相同的错误 - 所以我猜 WebCompiler 只是简单地在 Linux 上不起作用......有人知道启用或解决这个问题的方法吗?所有项目文档都说它具有“对 CI 场景的 MSBuild 支持”——没有明确说明我是否应该期望它与 Linux 一起工作。