CSCI 1301 – Lab 01

Clément Aubert

January 8, 2019

Your First Program

Opening Your First Program

  1. Download Welcome.zip and save it on your computer.
  2. Extract (Right-click on the file, then click on “Extract all”) this archive. Do not simply double-click on it, as that would only give you a preview of the archive without actually extracting it.
  3. Go in the “Welcome” folder that was created.
  4. Double click on the “Welcome.sln” file.
  5. Visual Studio (VS) should start, you don’t have to register to the “Visual Studio Team Services Organizations” (but you can, using your @augusta.edu account, if you want), discard the security warning if there is any.
  6. In the “Solution Explorer”, to the right, expand all the items that can be expanded by clicking on the ▷ symbol.

Compiling and Executing Your First Program

  1. In the Solution Explorer, double-click on Program.cs. This is the source code of the application you are actually considering.
  2. Let’s compile this program, using BuildBuild solution. What happened?
  3. Let’s run this program, using DebugStart without Debugging. What happened?

You will extensively compile and run programs in this class. Instead of having to click twice, I highly recommend that you start now memorizing shortcuts:

With Alt + F4 (to exit any program), that makes 3 shortcuts already! You can find a complete list at http://visualstudioshortcuts.com/, I will try to introduce some of useful shortcuts as we progress.

Configuring Your Installation

  1. You don’t need to install Visual Studio (VS), since it is already installed. If you want to install it on your own computer (which is recommended), go to “Installing Visual Studio On Your Own Computer” below.
  2. Make Windows Explorer show the file extensions. Follow the instructions on microsoft’s page, on this website, or consult your textbook.
  3. Launch VS, and make sure the line numbers are shown: “Tools” → “Options” → “Text Editor” → “All Languages” → “General” → “Line Numbers” (VS 15.5.2), or “Text Editor” → “Options” → “All languages” → “Line Numbers”.
  4. Exit VS, using ALT + F4

Backups

Finding The Right Tool

Since you can not store files permanently on the lab’s computer, you will have to store them either

If you chose the “remote” option (i.e., using a server), do not install a synchronization software (like Google Drive and Sync, Box’s app, etc.) on the lab computer: it will likely not work, due to University rules. Instead, create the structure / project / files on the computer during the lab, and upload them (using the web-interface) at the end of the lab. Make sure to always upload your files before unloging from the computer.

Making Sure You Have the Right Files

Now that you know where to store your files, create a folder for this class, and a subfolder for the first lab. You organization should look like the following:

└───csci1301
    └── 01_lab
        ├── Welcome.zip
        └── Welcome
            ├── Welcome.sln
            └── Welcome
                ├── Welcome.csproj
                ├── Properties
                │   └── AssemblyInfo.cs
                ├── Program.cs
                ├── obj
                │   └── Debug
                │       ├── Welcome.pdb
                │       ├── Welcome.exe
                │       ├── Welcome.csprojResolveAssemblyReference.cache
                │       ├── Welcome.csproj.FileListAbsolute.txt
                │       ├── TempPE
                │       ├── TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
                │       ├── TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
                │       ├── TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
                │       └── DesignTimeResolveAssemblyReferencesInput.cache
                ├── bin
                │   └── Debug
                │       ├── Welcome.vshost.exe.manifest
                │       ├── Welcome.vshost.exe.config
                │       ├── Welcome.vshost.exe
                │       ├── Welcome.pdb
                │       ├── Welcome.exe.config
                │       └── Welcome.exe
                └── App.config

You do not need to check that everything is here, just note that you have multiple folders, and that there are many files in the Welcome folder, not only the .sln and the .cs: make sure you copy all the structure when you want to backup or share your program! In this case, copying the Welcome foldel is enough.

Syllabus

Make sure you read the syllabus.

Installing Visual Studio On Your Own Computer

This part gathers some references for you to install Visual Studio on your own computer, regardless of your operating system. It is strongly encouraged that you do so, especially if you want to continue in a CS / IT degree, but not mandatory. The instructions are not really detailed: feel free to look on the Internet, ask your classmates or instructor for details or help.

  1. Normally, you should have received a log-in for OnTheHub and should be able to download ressources from them.
  2. If you’re not running Windows, there are two ways to proceed. You can jump to the next step if you’re running Windows.
    1. You are running MacOs: you can download a version of Visual Studio for MacOs on onthehub. It differs a bit from the windows version, but that should not impact your experience in this class.
    2. If your operating system is Debian, Android, MacOS, Red Hat, etc., you can do the following.
      1. Install a Virtual Machine. You can either get “VMware Fusion v8/10 for Mac” (only for MacOS), or download Virtual Box (any operating system) from their website.
      2. Download a version of “Microsoft Operating Systems”.
      3. Install and run your version of Windows from your virtual machine, and go to the next step.
  3. Download and install Visual Studio, leaving all the options on their default setting, but check the box next to “Workload” → “Windows” → “.NET-Desktop Development”.
  4. Configure the software as we did in “Configuring Your Installation”.

There are plenty of ways this can go wrong, but make sure you read and followed those instructions carefully before asking for help.