I am using Visual Studio 2010 SP1.
What I first tried was this:
msbuild myproject.sln or msbuild myproject.sln /p:Configuration=Release
devenv myproject.sln /Build and devenv myproject.sln /Run
Now, how do I build and run a solution without opening the IDE?
--------------------------FIXED------------------------------
The problem was that I was looking in the wrong place for the executable (noob mistake). I ended up using this batch file:
msbuild myproj.sln /p:configuration=Release
cd (("Path to executable" usually in the Debug/Release Folder))
myExecutableName
cd (("Path to original folder"))
You can replace the three separate cd
commands with a single one:
cd myproject\bin\Release
Or simply run your executable from the solution folder:
myproject\bin\Release\myproject.exe