Advertisement
Guest User

Untitled

a guest
Aug 1st, 2016
986
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.56 KB | None | 0 0
  1. :: for more information https://msdn.microsoft.com/en-us/library/b20w810z.aspx
  2. :: supports Microsoft Visual Studio 2010 - 2015
  3. @echo off
  4.  
  5. IF EXIST C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.exe (
  6.     CALL :build "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\"
  7.     GOTO:eof
  8. )
  9. IF EXIST C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe (
  10.     CALL :build "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\"
  11.     GOTO:eof
  12. )
  13. IF EXIST C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe (
  14.     CALL :build "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\"
  15.     GOTO:eof
  16. )
  17. IF EXIST C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe (
  18.     CALL :build "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\"
  19.     GOTO:eof
  20. )
  21.  
  22. CALL :error "Could not find Visual Studio directory."
  23.  
  24. :print_solution_name
  25.     echo.
  26.     echo Press any key to build %1 . . .
  27.     echo.
  28.     pause >nul
  29.     echo Building %1 . . .
  30.     GOTO:eof
  31.  
  32. :error
  33.     echo Build failed: %1
  34.     GOTO:eof
  35.  
  36. :build
  37.     cd %1
  38.     GOTO:build_b
  39.  
  40. :build_b
  41.     CALL :print_solution_name solution b
  42.     devenv "C:\Development\solution-b\solution-b.sln" /build Debug
  43.     GOTO:build_c
  44.  
  45. :build_c
  46.     CALL :print_solution_name solution c
  47.     devenv "C:\Development\solution-c\solution-c.sln" /build Debug
  48.     GOTO:build_a
  49.  
  50. :build_a
  51.     CALL :print_solution_name solution a
  52.     devenv "C:\Development\solution-a\solution-a.sln" /build Debug
  53.     GOTO:eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement