Created
April 14, 2015 20:35
-
-
Save jrusbatch/a6d2e18b75499098856e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo Off | |
:: If an existing file is specified, open that file. Otherwise, search the | |
:: current directory for a solution file to open. If a solution file is not | |
:: found, don't do anything. | |
@set VS_LAUNCHER="%PROGRAMFILES(X86)%\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe" | |
@set TARGET="%1" | |
@if not exist %TARGET% ( | |
@for %%f in (*.sln) do ( | |
@set TARGET=%%f | |
@goto :LaunchVisualStudio | |
) | |
@goto :eof | |
) | |
:LaunchVisualStudio | |
@if exist %TARGET% @start %VS_LAUNCHER% %TARGET% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment