Home > Net >  Visual Studio Does Not Generate .exe File
Visual Studio Does Not Generate .exe File

Time:05-12

I code an C program by VS 2022 but an error occurred when I tried to run it. I've built it successfully. I couldn't find any .exe file in 'debug' after I built it. It shows ('System can't find file'.)

CodePudding user response:

There might be something wrong with your configuration.
You mention the build has been successful. In that case, the "output" window, when you choose "Show output from:", and there you have chosen "Build", that output should contain a line, containing the two characters ->. Those characters clearly show where your application has been built, like in this example:

App.Server -> C:\Whatever_Directory\App.Server.dll

Please check that directory. In case your compilation result is not there, it has been moved or deleted, most possibly by:

  • a post-Build build event: check your project's properties, "Build Events"
  • a virusscanner.

Good luck

CodePudding user response:

The files can be complied outside of the project folder.

Right click your project > Open Folder in File Explorer > Navigate back one folder > x64 or x86 > Then you will see Debug or Release depending on what you have complied as.

Alternatively, the complier tells you the directory path where it has compiled to in the output window.

  • Related