Search code examples
c#visual-studio-2017exe

Changes on the code does not update on the exe file


I am using Microsoft Visual Studio version 2017. The solution has many projects. Upon building and running the solution, the changes on the code works. However, if I run the exe file, the changes on the code does not work.

I tried to clean the solution then rebuild the solution and the exe file is still not updated. I tried to delete both the bin folder and the obj folder then clean and rebuild the solution, it did not work. I also tried to delete the exe file then clean and rebuild the solution, it still didn't work.


Solution

  • The generated .exe file is placed in your project's bin folder. Check if you are running that .exe file.

    You might also check if the .exe file's creation date is updated after compilation. If not, you are not running the right .exe file.

    Perhaps you are running the .exe file from another project in your solution? Or - if you have multiple copies of your entire solution directory - in another solution folder than the one currently open in VS?