Usually, I place all the assets I need in the project folder, and whenever I run it using the Visual Studio debugger, it runs fine. But when I run the .exe file using the command line, or by just clicking on it, it has problems loading the files. The only way it can load the files is if copy all the resource files in the folder that my .exe application resides in. How could change where Visual Studio looks for the resource files when I run it using the Visual Studio Debugger so that it looks in the folder with the .exe in it, and not the project folder for all configurations (i.e. Debug and Release).
Asked
Active
Viewed 1,377 times
1
-
1You can change the working directory in the debugger settings of the IDE. – drescherjm Oct 02 '20 at 15:54
-
What are these assets? If they are images you can program your code to look for them in a different folder. – drescherjm Oct 02 '20 at 15:56
1 Answers
1
If I understand correctly you would like to move application dependencies into the Debug or Release folder. You can do it using project property page (right click on the project and select properties). From list on the left side, select build events. There are three options, you can use Post-Build. Have a look here : Visual Studio Post Build Event - Copy to Relative Directory Location

sinan
- 161
- 1
- 4