I'm encountering a strange issue when running a .NET 9 console application from a UNC path (e.g., \\computername\c$\folder\app.exe) on Windows 10 and Windows 11.
Symptoms:
- The application crashes immediately without any visible error, exception, or Windows Event Log entry.
- Even a minimal console app like the following does not output anything or reach
ReadLine():
Console.WriteLine("Starting");
Console.ReadLine();
- The same application:
- Works perfectly when run from a local path like
C:\folder\app.exe. - Works when built as a .NET 6 application, even when run from a UNC path.
- Works perfectly when run from a local path like
What I've Tried:
- Disabled antivirus/security tools temporarily – no change.
- Checked Event Viewer for application or system logs – nothing recorded.
- Verified that the UNC path has full access rights.
- Reproduced on multiple machines (both Windows 10 and 11).
- Ensured .NET 9 SDK/runtime is properly installed.
Questions:
- Is there a known issue with running .NET 9 applications from UNC paths?
- Has anything changed in .NET 9 that might affect execution from network shares?
- Are there any new runtime security restrictions, policies, or settings in .NET 9 I should be aware of?
Any pointers or suggestions would be greatly appreciated. Thanks!