Since I’m starting to use Bash on Windows (WSL) more regularly, I added a quick way to launch Visual Studio 2017.
- Edit .bashrc and add the VS path (I’m obviously using Enterprise so your path may be different): export PATH=$PATH:”/mnt/c/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/Common7/IDE”
- I chose to add an alias, so I also added this to my .bashrc: alias vs2017=devenv.exe
- Reload your shell: . /.bashrc
Now I can quickly pop open Visual Studio by using “vs2017”. For example, to open an existing solution I can navigate to the folder containing the .sln and simply type “vs2017 mysolutionfile.sln” at my bash prompt and VS2017 will fire up with that project loaded.
Here’s my .bashrc if you want to see the full file.