Hi, @Dani_S. Welcome to Microsoft Q&A.
Please troubleshoot the problem from the following aspects
- Make sure that your program could run normally in Debug mode.
- Make sure that the deployed project does not lack any dependencies. If you use
ExcludeFromSingleFile
when publishing, make sure that the necessary dependencies are not missing. - If you specify the runtime environment through
RuntimeIdentifier
, make sure that the project runs in the specified environment. The target machine may not have the .NET runtime environment suitable for running the application installed. You could check whether the runtime environment is complete by running thedotnet --info
command on the target machine. - Permission issue: The target machine may have limited execution permissions for the
exe
file, resulting in failure to run. - You could view the log to see the specific reason why the project cannot run, such as through
Event Viewer
or writing a run log to see the real reason for the failure.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.