changed new implementation to be backward compatible with old versions of the framework that do not specify providers or files in the compile config
Merge pull request #5206 from darrylkuhn/backward-compatible-optimize

Make OptimizeCommand backward compatible