title: visual studio 2017: open AND build solution from a command line call
body: <p>In visual studio 2017 (or probably any version) I want to open a solution in the IDE and start it building from the command line. IF the solution is already open then I just want it to start building (in the IDE).</p>
  
  <p>So I can open the solution like this:</p>
  
  <p><code>devenv solution.sln</code></p>
  
  <p>Or I can build it like this:</p>
  
  <p><code>devenv /build solution.sln</code></p>
  
  <p>There is also this:</p>
  
  <p><code>devenv solution.sln /command ...</code></p>
  
  <p>But the documentation on what "commands" there are is very difficult to find out about... The example is some user made macro, but I assume there are other built in commands? - this may help...?</p>
  
  <p>But I am not sure how to:</p>
  
  <ul>
  <li>Open a solution in the IDE and have it build straight away</li>
  <li>If its already open just get it to start building.</li>
  </ul>
  
  <p>Is there some way to do this?</p>
  
  <p>My use case is to kick off the build from within IBM Rhapsody. In MSVS2012 it supported a Rhapsody addin which did these tasks... but addins have been deprecated since 2013 so I can get Rhapsody to do what I want by re-writing its make file content - the makefile will just call a batch file script which will do the commands that I am trying to do in this question - and then Rhapsody plugin done :)</p>