A step-by-step guide to install on your own computer Visual Studio (VS), Azure Data Studio (ADS), and connect to the DB server

I am not going to mince words. This personal device set-up can be frustrating and it is NOT recommended for beginners. Going to any of the four McIntire labs is much easier to do: our helpdesk has set up for you computers that you can use right away. However, if you want to work from home or use your laptop, then follow these instructions closely and be patient. It might not work on the first or second try (mine worked on the third try).


Installing ADS on your computer (DB homework only)

Good news: you can download Azure Data Studio from the web for free. There are versions for Windows and MacOS. 

For Windows you most likely need the user installer x64.  If that does not work, try the others.
For MacOS you most likely need the universal, else match the chip you have.

If working off grounds, use your UVA VPN to connect. UserId and Password will be given to you in class.


I have ADS but I am using windows authentication (i.e., no SQL server password)

In windows, or in Parallel/Boothcamp if you have a Mac.

1) Create a text file containing the following text as a single line:
runas /netonly /user:"mcintire\sg6m" "C:\Users\sg6m\AppData\Local\Programs\Azure Data Studio\azuredatastudio.exe"
2) Replace "sg6m" with your own McIntire userid
3) Replace in (1) the exact location of ADS (its filename is azuredatastudio.exe) in your computer.  You need to find it.
4) Save the file as "ADS from home.bat"
5) Start the VPN
6) Click on the "ADS from home.bat" file and enter your McIntire network password if requested
7) Make sure that in your code you refer to the server with its full name: f-sg6m-s4.comm.virginia.edu




Installing VS on your computer (most homework)


I have a Mac

If your Mac is pretty old, or you do not have much space on your hard disk, desist. Go to the lab. It will save you much distress.
You might find online that there is a version of VS for the Mac.  However, that version does not have all the functionality that we need for this advanced course. So, you need to install software that will make your Mac run Windows.
1) Install Windows on your Mac using software like Bootcamp or Parallels
2) Install Office for Windows
3) Add Visual Studio.  Good news: you can download the Community edition  from the web for free
4) Add VSTO (also free, see #5 below)

I have a Windows computer

1) Install Office for Windows (likely, you have it already)
2) Now download Visual Studio.  Good news: you can download the Community edition  from the web for free.
3) Add VSTO (free, see #5 below)


I have Visual Studio (VS) but I do not have VSTO

5) Start VS
6) Go to Tools > Tools and features
7) The installer will start.  Look for "Office/SharePoint development," which is the one that has VSTO, and select it.


I have Visual Studio and VSTO, and now I need to connect to the database server (only database homework)

1) Create a text file containing the following text as a single line:
runas /netonly /user:"mcintire\sg6m" "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe"
2) Replace "sg6m" with your own McIntire userid
3) Replace in (1) the exact location of Visual Studio (its filename is devenv.exe) in your computer. Find devenv.exe and make the changes.
4) Save the file as "VS from home.bat"
5) Start the VPN if you are off grounds.
6) Click on the "VS from home.bat" file and enter your McIntire network password if requested.  Note: the cursore will not move, but the password will accepted
7) Make sure that in your code you refer to the server with its full name: f-sg6m-s4.comm.virginia.edu


Debugging VSTO on Windows

A few students had trouble running VS on their machines and were getting an "Unable to create a VSTO workbook" error or similar. The following is not a guaranteed solution, but had a high success rate:
1) Make sure Visual Studio and all other Microsoft programs are closed
2) Open the Control Panel.  Click “Programs and Features”. In the left sidebar, click “View Installed Updates”
At the very top-right of the "Uninstall an Update" screen, type into the Search box: KB3115135. There may be one or more entries labeled "Security Update for Microsoft Office 2016 (KB3115135)".  Select and click Uninstall.  Uninstall them all. Now, reopen Visual Studio.  You should be able to create a VSTO workbook.
Home users: this update may come back again in the future.  Either repeat step 2-3 above, or download the “Show or Hide Updates” tool from Microsoft to permanently block KB3115135: https://support.microsoft.com/en-us/help/3183922/how-to-temporarily-prevent-a-windows-update-from-reinstalling-in-windows-10