Repository navigation
Closed
Description
On my system, any project that uses .NET SDK 10.0.100 (for any target) fails to build with error MSB6006: "csc.exe" exited with code -1073741819.
The problem appears only when SDK 10.0.100 is installed, while running the compiler directly does not crash.
Projects targeting net9.0 and lower build successfully as long as sdk 10 is not installed.
Both MSI and binary installations produce the same results. VS Repair did not help either. <UseSharedCompilation>false</UseSharedCompilation> was also attempted.
to reproduce
mkdir C:\Temp\HelloTest
cd C:\Temp\HelloTest
dotnet new console -f net10.0 -n HelloTest
cd HelloTest
dotnet build -v n
HelloTest net10.0 failed with errors (1)
C:\Program Files\dotnet\sdk\10.0.100\Roslyn\Microsoft.CSharp.Core.targets(84,5): error MSB6006: "csc.exe" exited with code -1073741819.
dotnet --info:
.NET SDK Information:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.100-manifests.355811b7
MSBuild version: 18.0.2+b0f34d51f
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.100\
Installed .NET Workloads:
[wasm-tools]
Installation source: VS 18.0.11205.157, VS 17.14.36705.20
Manifest version: 10.0.100/10.0.100
Manifest path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.workload.mono.toolchain.current\10.0.100\WorkloadManifest.json
Installation type: Msi
Configured to use workload sets for installing new manifests.
No workload sets are installed. Run dotnet workload restore to install a workload set.
Host:
Version: 10.0.0
Architecture: x64
Commit: b0f34d51fc
.NET SDKs installed:
5.0.400 [C:\Program Files\dotnet\sdk]
6.0.428 [C:\Program Files\dotnet\sdk]
8.0.412 [C:\Program Files\dotnet\sdk]
9.0.307 [C:\Program Files\dotnet\sdk]
10.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
I am attaching csc.exe crash dump as well
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
jjonescz commentedon Nov 13, 2025
That exit code means "access violation" and I can see it's happening inside the apphost - this is the stack trace from debugging the dmp file:
cc @agocke
@equmagg can you try setting trace env vars to get more logs from the apphost execution?
equmagg commentedon Nov 13, 2025
Sure
csc_host_trace.txt
agocke commentedon Nov 13, 2025
Since the code is crashing in ntdll, I think a dump file would be most useful. Could you collect a dump by following the instructions at https://learn.microsoft.com/en-us/windows/win32/wer/collecting-user-mode-dumps?If you want to keep it private, you could create a bug at https://developercommunity.visualstudio.com/dotnet, which should allow you to attach a private dump file that we can access.I see you already collected a dump. Thanks! We'll take a look
agocke commentedon Nov 13, 2025
cc @elinor-fung
agocke commentedon Nov 13, 2025
Ah, I see the failing stack is actually in coreclr:
agocke commentedon Nov 13, 2025
@elinor-fung can you take a look?
agocke commentedon Nov 13, 2025
@equmagg It looks like this is failing in the setup for the CET security feature, which is on-by-default for csc.exe in .NET 10. Since you're using Windows 10, can you make sure you're fully up-to-date on Windows patches? Early versions of Windows 10 had some CET bugs that caused these kinds of failures, but they should all be fixed in the very latest builds.
Fix access violation when reporting fatal errors during startup
jkotas commentedon Nov 13, 2025
#121602 is fixing the error message (we crash while trying to print the error message).
Fix access violation when reporting fatal errors during startup
Fix access violation when reporting fatal errors during startup (#121602
twm1005 commentedon Nov 20, 2025
I'm running into the exact same issue.
You mentioned that it's failing during setup for the CET security feature, which is enabled by default for csc.exe in .NET 10. Since you're on Windows 10, could you verify that all the latest Windows updates are installed? It looks like csc is crashing instead of showing a proper warning or error message, but that still doesn't seem to address the root problem.
For reference, I'm on Windows 11 (my dotnet --info reports OS Version: 10.0.22000), and I'm fully patched through Windows Update.
jkotas commentedon Nov 20, 2025
If you are on fully patched Windows 11, your
dotnet --infoshould reportOS Version: 10.0.26200.twm1005 commentedon Nov 20, 2025
I'm all set now. Windows Update had been telling me I was up to date, but that turned out not to be true—even after clicking “Check for updates” several times. After I posted my comment, my system actually crashed, which helped reveal that something was wrong with Windows Update.
Once I restarted a few services, Windows Update finally pulled in a series of updates. After installing them, I’m now able to build my solutions without any issues. Now I need to work on updating my version of 21H2 to the latest.
kseroff commentedon Nov 21, 2025
I am another victim of this problem. Only in my case, the Windows 10 22h2 version should be saved, according to my terms of reference, it is on the list and several more linux distributions. What is the chance that everything will be normal on them too? I can't answer that either.
.Net 9 also has a problem after upgrading from csc, as if they are forced to go down to .NET 8 or go to QT.