in my application, I use various resources. I specified pre-build events to copy my resources to output directory. My directory structure looks like this:
/Debug/Models/
/Debug/Shaders/
/Debug/Textures/
/Debug/sfero.exe
/Debug/...
I want to access these resources relative to the .exe file and that works fine when I run the executable directly from Debug folder, but when I run it in Visual Studio, it is being launched in different directory, thus I cannot access my resources. Obviously, I don't want to copy my resources to location from where Visual Studio runs my application.
Any suggestions? Thanks
You can either make your application logic smarter about searching for resources, or you can pass command-line parameters (see the Debugging area of Project Properties) when launching from Visual Studio, passing the path where to look.