microsoft / dotnet

This repo is the official home of .NET on GitHub. It's a great starting point to find many .NET OSS projects from Microsoft and the community, including many that are part of the .NET Foundation.
https://devblogs.microsoft.com/dotnet/
MIT License
14.36k stars 2.22k forks source link

error with publish of dotnet 8.0.101 #1425

Open siulam opened 8 months ago

siulam commented 8 months ago

use cmd : dotnet publish --no-restore --configuration Release what's problem?

error like this: /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/pinvoke.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/pinvoke.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/driver.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/driver.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/corebindings.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/corebindings.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] ecis -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis/bin/Release/net8.0/ecis.dll Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink Compiling native assets with emcc with -Oz. This may take a while ... /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/pinvoke.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/pinvoke.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/corebindings.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/corebindings.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : Failed to compile /home/gitlab-runner/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/8.0.1/runtimes/browser-wasm/native/src/driver.c -> /home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/obj/Release/net8.0/wasm/for-publish/driver.o [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : File "/home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.34.Sdk.linux-arm64/8.0.1/Sdk/../tools/emscripten/emcc.py", line 193 [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : logger.debug(f'(not saving intermediate {name} because not generating JS)') [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : ^ [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] /home/gitlab-runner/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/8.0.1/Sdk/WasmApp.Native.targets(366,5): error : SyntaxError: invalid syntax [took 0.01s] [/home/gitlab-runner/builds/pBNz6NsDZ/0/2025/ecis/ecis.Client/ecis.Client.csproj] ERROR: Job failed: exit status 1

siulam commented 8 months ago

when I use cmd: dotnet publish --no-restore --configuration Debug, there is no error.