Cannot publish .Net Blazor App: The application was terminated by a signal: SIGHUP

Issue

This Content is from Stack Overflow. Question asked by Alvin Stefanus

I do not know what was happening suddenly I cannot publish my Blazor application. This is the error:

dotnet publish
/usr/local/share/dotnet/dotnet publish "/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/MyApp.Server.csproj" --configuration "Release" --output "bin/Release/net6.0/publish"

MSBuild version 17.3.1+2badb37d1 for .NET
  Determining projects to restore...
/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/MyApp.Server.csproj : warning NU1701: Package 'BouncyCastle 1.8.9' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/MyApp.Server.csproj : warning NU1701: Package 'PayPal 1.9.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
  All projects are up-to-date for restore.
/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/MyApp.Server.csproj : warning NU1701: Package 'BouncyCastle 1.8.9' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/MyApp.Server.csproj : warning NU1701: Package 'PayPal 1.9.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8, .NETFramework,Version=v4.8.1' instead of the project target framework 'net6.0'. This package may not be fully compatible with your project.
  MyApp.Shared -> /Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Shared/bin/Release/net6.0/MyApp.Shared.dll
  MyApp.Client -> /Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Client/bin/Release/net6.0/MyApp.Client.dll
  MyApp.Client (Blazor output) -> /Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Client/bin/Release/net6.0/wwwroot
  MyApp.Server -> /Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Server/bin/Release/net6.0/MyApp.Server.dll
  Optimizing assemblies for size, which may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
  Compressing Blazor WebAssembly publish artifacts. This may take a while...
/usr/local/share/dotnet/sdk/6.0.401/Sdks/Microsoft.NET.Sdk.BlazorWebAssembly/targets/Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): error MSB6006: "/usr/local/share/dotnet" exited with code 1. [/Users/alvinstefanus/Documents/Projects/MyApp/MyApp/MyApp/Client/MyApp.Client.csproj]
The application was terminated by a signal: SIGHUP

If I remember I was deleting the “bin” and “obj” folder from Client and Server project several times, and this happens.

If I disable the “BlazorCompression”, then it works fine:

<BlazorEnableCompression>false</BlazorEnableCompression>

But I do not want to disable the compression because my initial app loading will be large and slow.

How can I fix this?

I am using Visual Studio Mac 2022 with .Net 6



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?