【问题标题】:dotnet build failed with zero errors and warnings on mac m1dotnet 构建失败,在 mac m1 上出现零错误和警告
【发布时间】:2022-10-03 07:36:30
【问题描述】:

当我尝试使用 dotnet build 命令从终端构建我的服务时,我收到此错误:

MSBuild version 17.4.0-preview-22428-01+14c24b2d3 for .NET

Build FAILED.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.00

当我尝试使用dotnet run --project ... 运行它时,我会收到以下消息:

The build failed. Fix the build errors and run again.

有趣的是,当我通过 Visual Studio 运行此服务时,一切都可以正常构建和运行。

我需要从终端运行它的原因是因为该项目是在微服务架构中实现的,为了完全午餐它我需要运行 14 个微服务。

    标签: c# .net macos visual-studio compiler-errors


    【解决方案1】:

    我也有同样的问题,好像是bug on .NET 7 RC1

    作为一种解决方法,我正在执行以下操作:

    dotnet build --disable-build-servers
    dotnet run --no-build
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-10-24
      • 2021-12-11
      • 2017-12-31
      • 2022-08-22
      • 2022-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多