It's a bug that happens when certain conditions are met, which aren't met when running it via Visual Studio.
You need to re-create those conditions. For example, the path.