FPGA configuration failed: Cannot find configuration file

I am using Opal Kelly XEM6310LX45

I have the bit file in the working folder. What are the possible for the problem. FPGA configuration failed: Cannot find configuration file.

Are you certain? What does getcwd return?

I put the bit file in the cwd from getcwd and it works. (earlier I put that in the debug subfolder). Thanks

If you’re using Windows and Visual Studio, this is a common gotcha. VS starts the application with the cwd set to the project folder, not the release folder.