Failed to Load Frame from File While Debugging Sample


Debugging Zivid code sample outputs the following message:


Failed to load frame from file: Zivid3D.zdf

Failed to open file while debugging Zivid sample

Possible cause

Some samples we provide depend on input files, such as the Zivid3D.zdf. When you configure the samples with CMake we copy these files. They are copied to the same folder as the executable will be generated.

When you use Visual Studio to debug the sample, please note that Visual Studio will by default execute from the ${ProjectDir}. Thus, the sample won’t find the input files, which it expects to find in ${TargetDir}.


In order to solve this, simply set the Working Directory to ${TargetDir}.

Open C# project properties Modify C# project working directory