I personally would use AutoHotkey
It would look something like this:
;Win + A to run
#a::
;Run Visual Studio
Run "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe"
;Open Project Ctrl + Shift + O
Send ^+o
;Wait for it to open 5 Seconds
Sleep 5000
;Import a NuGet Package
Send [key sequence]
;Wait for it to import 5 Seconds
Sleep 5000
;Run the site
Send F5
;Wait for your validation 10 sec
Sleep 10000
;Close Visual Studio Alt + F4
Send !{F4}
Return
EDIT:
Some Tips and things I have found that helps with automation scripts:
- Break up a large script into multiple smaller scripts. For ex. break the script into 3 parts. The first script will open Visual Studio and open the project, the second script imports the NuGet package, the third runs the site and closes Visual Studio. If you make the hot keys associated with the script something like Ctrl + 1, Ctrl + 2, Ctrl + 3, then it is super easy to go click, click, click, and run them all. It also allows you to re-run the script if something didn't run right the first time without having to restart from the beginning. I usually break up the script if there is a delay, or I have to wait for something to load because it is too easy for the script to continue and fire off too soon.
Use WinWait / IfWinNotActive instead of delays. This will cause the script to wait for the specific window to be activated before you continue to run the script. For Ex:
.
WinWait, Google - Windows Internet Explorer,
IfWinNotActive, Google - Windows Internet Explorer, , WinActivate, Google - Windows Internet Explorer,
WinWaitActive, Google - Windows Internet Explorer,
; Carry on and do stuff in Internet Explorer
This code will wait until you have activated the Internet Explorer with the Google home page on it. There are various ways to get the window text, but it also applies to dialog boxes, so you can wait for stuff to happen.
- Use a macro recorder to help write the script and automate things. For ex. Macro Creator is a very powerful one.