Visual Studio is handled as a special case for autogen depends. However, the special handling works only for target dependencies, not file dependencies output by a custom command. Use a PRE_BUILD step only if all depends are targets.