I’ve been having this little bug and I just can’t seem to find a solution so I figured someone on here might know. Generally for work I develop in Visual Studio on my main desktop computer. I commit everything to github ( except the build folders and .sdf databases to save some git space ) when I pull it onto a new machine ( say my laptop ) the project builds and compiles successfully but it doesn’t seem to be able to load any actual assets while debugging through visual studio.
If I simply build the project then double click to open the .exe everything loads fine ! So it’s not the end of the world it’s just annoying that I can’t really debug from within visual studio without copying over all my paths and readding all my dependencies to a fresh project via the solution explorer. The readouts just say that no assets are found, or are unable to load fonts/ images/ videos from the paths I provide. I’ve run into this problem before when using the useful Restart on Crash ( http://www.softpedia.com/get/System/File-Management/Restart-on-Crash.shtml ) If I just select the application to be relaunched it tries to load / launch the app from wherever restart on crash is and not where the application path is so I get these same pathing issues. To fix this issue with restart on crash I point the restart command to a windows batch script that first changes directory to the correct path and then calls “start” on my .exe. Does anyone know if this is easily done inside Visual Studio ? I’m able to add in linker and search paths but I haven’t messed around with the build / post build commands too much. My hunch is that somewhere along the lines I’m setting an absolute path on a machine and this is getting read on my secondary machine that has a different username / file structure.
Any or all suggestions would be totally awesome ! Thanks.