If you click [Generate] project first, and then press F5 to debug it, it will not report an error, but when you debug it again after modifying the code later, you will find that VS starts the program before the code modification, which means that the deeper problem is actually The debugging will not be done by Mr. Instead, it directly opens the exe that already exists in the debug/release directory, so if the exe does not exist, debugging will report the error shown above.
There are two main approaches to searching.
- Reset VS.http://jingyan.baidu.com/article/47a29f24291108c0142399e0.html
- Re-reference other projects or assemblies used by the project
But none of them solved it, and finally found a solution at stackoverflow: the
Among CZFox's answers.
- First make sure that the project output path is set correctly. Output paths are viewed/set here: project properties generate output paths
- When finished make sure that in [Configuration Manager] (in the menu [Generate]) the Generate checkbox for the project is ticked, as shown.