What do you mean automate? You always should provide the build without Visual Studio. Fortunately, MSBuild does it all. You can build a separate project or a solution; you can also create a custom project file which can build nearly anything: a set of solutions, use custom build step, 3rd-party compilers and any other tools.
Basically, this is all you need to do the build of existing projects or solutions. You don't need Visual Studio installation on the build computer: everything comes with (redistributable) .NET Framework installation.
And this is all the information on API and everything you may possibly need:
Happy New Year!