This page was last updated: October 1, 2015
Option 1 (For anyone who wants the latest Visual Studio):
- Download Visual Studio 2015.
The Enterprise Edition is free for engineering students via Dreamspark (Log in to TEACH as though you were turning in an assignment, click on Microsoft Dreamspark Login under External Sites in the right-hand menu, then search for Visual Studio Enterprise). The Community Edition (which should work as well, although with fewer features) is free to everyone directly from Microsoft at https://www.visualstudio.com/en-us/products/vs-2015-product-editions.aspx
- Make sure you select the Custom installation option, then check the 'Visual C++' box. (Alternatively, if you already installed Visual Studio 2015 but did not check that box, you can launch the installer again and select "modify" then check the box and continue.)
- Open the project by clicking on the Sample.sln file contained in the .zip on the class webpage. It might pop up a dialog warning you not to trust unknown packages; just click OK on that.
- It should then pop up a dialog box talking about the compilers and libraries for this project. If so, click 'Yes'. If not, right click on the project in the solution explorer on the right-hand side of the screen (it should be directly below "Solution 'Sample' (1 project)") and click on "Upgrade VC++ Compiler and Libraries."
- Right click (again) on the project (or solution, or click on the Build menu at the top of the screen) and select "rebuild." This remakes a few files that wouldn't have worked with VS2015. (Note that you should NOT change it from debug to release. If it is for some reason set to release it may fail to build due to linking errors)
- Hit F5 or click on the Debug menu and select "Start Debugging."
- That's it. The program should be running now.
Option 2 (For anyone who just wants to download Visual Studio and run the program):
- Download Visual Studio 2010.
I could not find the right versions of this on Dreamspark (or virtually anywhere else), but you can download it directly from Microsoft with the links provided on this page: http://stackoverflow.com/questions/8894654/vs-2010-trial-version-link
(Note that this may eventually ask you for a product key if you picked any version other than Express. If it does stop working for that reason, you may need to move to option 3)
- Make sure C++ is selected when installing VS2010 (I believe it is by default).
- Open the Sample.sln file contained in the .zip on the class webpage.
- Build the project (click on Build in the top menu, Build Solution or Build Project).
- Hit F5 or select Debug -> Start Debugging.
- The program should be running now.
Option 3 (For anyone who already has some other version of Visual Studio and doesn't want to switch):
Either try to mimic option 1 with whatever changes might need to be made, or:
- Download Visual Studio 2010.
Any of the versions should work. You can find the official downloads at: http://stackoverflow.com/questions/8894654/vs-2010-trial-version-link
- Install Visual Studio 2010. You only need C++ to be installed here, as all you really need is the v100 build tools that comes with that version.
- Open the Visual Studio version of your choice.
- Open the project options menu (Most likely by right clicking the project in the solution explorer, then selecting "options" or "configure" or "settings")
- Find "Platform Toolset," click on the drop down menu to change it, and select "Visual Studio 2010 (v100)" (or whatever option has "v100" in it). If it is not present for some reason, then either VS2010 did not install correctly, or you may have to choose a different option.
- Build the project and run/debug it. This should now be using VS2010's compiler and libraries, and will therefor work just as if you were running VS2010. Note that this does mean you cannot use any features in your code that were not included in the VS2010 compiler, but it also means you can send your project to anyone using VS2010 and they will be able to build it right away.