Repository navigation
EMCC command failing after .NET 10 update #121783
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I have a blazor wasm application. I have just tried to update to .NET 10 and I get the 2 errors below when trying to build:
The command "emcc "@C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-default.rsp" -msimd128 "@C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-link.rsp" "@C:\Ws\Repo\DEV\PDS\NetCore\Client\PDS.Web\Site\obj\Debug\net10.0\wasm\for-build\emcc-link.rsp"" exited with code 1.
/NODEFAULTLIB:MSVCRT: No such file or directory ("/NODEFAULTLIB:MSVCRT" was expected to be an input file, based on the commandline arguments provided)
Builds fine in .NET 9.
When I double click it takes me to BrowserWasmApp.targets at this line:
<Exec Command='emcc "@$(_WasmDefaultFlagsRsp)" $(_WasmDefaultFlags) "@$(_WasmDefaultLinkFlagsRsp)" "@$(_WasmLinkRsp)"' EnvironmentVariables="@(EmscriptenEnvVars)" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="_EmccLinkStepConsoleOutput" />
<Output TaskParameter="ExitCode" PropertyName="_EmccLinkStepExitCode" />
</Exec>
At this point i'm dead in the water so some help would be appreciated!
Any thoughts?
Expected Behavior
No build error
Steps To Reproduce
Update Blazor app to .NET 10
Exceptions (if any)
The command "emcc "@C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-default.rsp" -msimd128 "@C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-link.rsp" "@C:\Ws\Repo\DEV\PDS\NetCore\Client\PDS.Web\Site\obj\Debug\net10.0\wasm\for-build\emcc-link.rsp"" exited with code 1.
/NODEFAULTLIB:MSVCRT: No such file or directory ("/NODEFAULTLIB:MSVCRT" was expected to be an input file, based on the commandline arguments provided)
.NET Version
10
Anything else?
No response
Activity
javiercn commentedon Nov 19, 2025
@radekdoulik @pavelsavara any thoughts?
williambuchanan2 commentedon Nov 20, 2025
I have an update on this. Problem wasn't happening on another developer's PC. The difference we noticed was that he hadn't installed the .NET 10 Runtime whereas I had. I uninstalled VS and everything .NET 10 related. The folder with the targets file still existed (C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\10.0.0) so I renamed this folder. Rebooted and reinstalled VS2026 without installing other .NET packages and now the problem has gone.
williambuchanan2 commentedon Nov 21, 2025
Today it started happening on Azure Devops pipeline:
Linking with emcc with -O2. This may take a while ...
##[error]emcc(0,0): Error : /NODEFAULTLIB:MSVCRT: No such file or directory ("/NODEFAULTLIB:MSVCRT" was expected to be an input file, based on the commandline arguments provided)
emcc : error : /NODEFAULTLIB:MSVCRT: No such file or directory ("/NODEFAULTLIB:MSVCRT" was expected to be an input file, based on the commandline arguments provided) [D:\a\1\s\NetCore\Client\PDS.Web\Site\PDS.Web.csproj]
##[error]C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\10.0.0\Sdk\BrowserWasmApp.targets(522,5): Error MSB3073: The command "emcc "@C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-default.rsp" -msimd128 "@C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-link.rsp" "@d:\a\1\s\NetCore\Client\PDS.Web\Site\obj\Release\net10.0\wasm\for-publish\emcc-link.rsp"" exited with code 1.
C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\10.0.0\Sdk\BrowserWasmApp.targets(522,5): error MSB3073: The command "emcc "@C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-default.rsp" -msimd128 "@C:\hostedtoolcache\windows\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.browser-wasm\10.0.0\runtimes\browser-wasm\native\src\emcc-link.rsp" "@d:\a\1\s\NetCore\Client\PDS.Web\Site\obj\Release\net10.0\wasm\for-publish\emcc-link.rsp"" exited with code 1. [D:\a\1\s\NetCore\Client\PDS.Web\Site\PDS.Web.csproj]
erikdalle commentedon Nov 21, 2025
Same issue, found that we had this in our .csproj. Dont remember why but removing it seems to stop the error from occuring.
<EmccInitialHeapSize>16777216</EmccInitialHeapSize>Filipowicz251 commentedon Nov 22, 2025
I have the same after upgrading to .NET 10
williambuchanan2 commentedon Nov 24, 2025
Any updates on this? It's a complete show stoper for me at the moment.
williambuchanan2 commentedon Nov 24, 2025
For anyone stuck on this, I have found a workaround. I don't make any guarantees about it but it seems to get past the problem for me.
Add the following to your .csproj file:
And create a file in the root of your web application named 'FilterWasmLinks.ps1' which includes the below contents:
Hopefully it will get some of you out of trouble until a proper fix is in place...
akoeplinger commentedon Nov 24, 2025
@williambuchanan2 do you happen to reference the Sentry nuget package? They had a bug where they accidentally added this flag for all platforms when building on Windows. The fix for Browser targets is getsentry/sentry-dotnet#4631 which is in the 6.0.0-preview.2 version of the Sentry package. The fix for Android is pending on getsentry/sentry-dotnet#4760
dotnet-policy-service commentedon Nov 24, 2025
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
williambuchanan2 commentedon Nov 24, 2025
@akoeplinger yes I do happen to be using Sentry! At least there is an explanation for it now... Thanks for the heads up - I will keep the workaround in place until they release a fix...
akoeplinger commentedon Nov 24, 2025
The Sentry 6.0.0-preview.2 version is already on nuget.org so you can give it a try if you only need the fix for Browser targets.
I'll close this issue as this is not a runtime issue.