Forum Discussion
C# .NET Framework 4.8 -> .NET 9
A framework-dependent .NET application normally needs more than the EXE. Its publish output includes the application DLL, dependencies and runtime configuration; copying only the executable can leave the target without the information or assemblies needed to launch.
In Visual Studio, publish to a folder with Deployment Mode set to Framework-dependent and Target Runtime set to win-x64. Copy that complete publish folder to the Windows 10 computer. The equivalent command is dotnet publish -c Release -r win-x64 --self-contained false.
On the target, use dotnet --list-runtimes, not --list-frameworks. If this is WinForms or WPF, check specifically for Microsoft.WindowsDesktop.App 9.x of the correct architecture; the base runtime alone is insufficient. Run the deployed app from a terminal and preserve the exact error if it still fails. A self-contained build working is consistent with missing runtime/deployment dependencies, but does not identify which one without that error.