This command operates only on projects, not on files (like <File>)

This command operates only on projects. This error has the following cause and solution: