Create a batch file like the following (mine is called buildsln.bat). This command is rather simple, you can make one as fancy as you need.
@echo off "C:\Program Files (x86)\MSBuild\14.0\Bin\msbuild" "%1" /t:build /v:minimal if errorlevel 1 pause
Import the following into the Registry (as an Administrator) to add an Open With menu selection when you right-click a .sln file.
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Orthogonal.buildsln] @="Build SLN" [HKEY_CLASSES_ROOT\Orthogonal.buildsln\Shell\Open\Command] @="\"C:\\ProgramData\\Utility\\buildsln.bat\" \"%1\"" [HKEY_CLASSES_ROOT\.sln\OpenWithProgids] "Orthogonal.buildsln"=""
Change the key name
Orthogonal.buildsln
to be whatever suits you.
Set the first default key value to be the text that is displayed in the context menu. The next default key value is the path to the batch file.
No comments:
Post a Comment