---
title: CSCI 1301 -- Lab 01
author: Clément Aubert
lang: en
fontsize: 10pt
documentclass: scrartcl
numbersections: true
links-as-notes: true
papersize: letter
geometry: margin=1in
keywords:
- Computer Science
- Problem solving methods
- Syllabus
- Augusta University
- Bachelor of Science
---


# Your First Program

## Opening Your First Program

#. Download [Welcome.zip](Welcome.zip) and save it on your computer.
#. 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.**
#. Go in the "Welcome" folder that was created.
#. Double click on the "Welcome.sln" file.
#. 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.
#. 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

#. In the Solution Explorer, double-click on `Program.cs`. This is the *source code* of the application you are actually considering.
#. Let's compile this program, using `Build` → `Build solution`. What happened?
#. Let's run this program, using `Debug` → `Start 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:

- Use <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> to build the solution,
- Use <kbd>Ctrl</kbd> + <kbd>F5</kbd> to start the program without debugging.

With <kbd>Alt</kbd> + <kbd>F4</kbd> (to exit any program), that makes 3 shortcuts already!

# Configuring Your Installation

#. 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"](#installing-visual-studio-on-your-own-computer) below.
#. Make Windows Explorer show the file extensions. Follow the instructions [on microsoft's page](https://answers.microsoft.com/en-us/windows/forum/windows_10-files/how-to-display-file-extensions-in-w-10/226d323d-978a-47de-bd1d-8780643897e3), [on this website](http://kb.winzip.com/kb/entry/26/), or consult your textbook.
#. 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".
#. Exit VS, using <kbd>ALT</kbd> + <kbd>F4</kbd>

# Backups

## Finding The Right Tool

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

- On an external / removable data storage: USB flash drive, External hard disk drive, or any kind of USB mass storage device, or
- On a server: the University has a [partnership](https://www.augusta.edu/its/box/) with [box.com](https://box.com/), and you can follow [this tutorial](https://www.augusta.edu/its/box/quickstart.php) to get started, but any service ([Google Drive](https://www.google.com/drive/), [Dropbox](https://www.dropbox.com/), [OneDrive](https://onedrive.live.com/), etc.) would do.

If you chose the "remote" option (i.e., using a server), **do not** install a synchronization software (like [Google Drive and Sync](https://www.google.com/drive/download/), [Box's app](https://app.box.com/services/browse/official), etc.) on the lab computer: it will likely not work, due to [University rules](https://augusta.policytech.com/dotNet/documents/?docid=5702).
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
    ├── 02_lab
    │   └── Welcome1.zip
    ├── 03_lab
    └── txtbook_source
        └── examples.zip
```

Extract the archives `examples.zip` and `Welcome1.zip` in their respective folder and suppress them.
-->

```
└───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
```

Note that there are many files in the `Welcome` folder, not only the `.sln` and the `.cs`: make sure you copy all the structure as indicated above!

# Syllabus

Make sure you read [the syllabus](http://spots.augusta.edu/caubert/pcp/).

# 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.

#. Go to [Dr. Schultz's webpage](http://spots.augusta.edu/tschultz/resources/SWAvailable.html). Read the content of the page and click on the additional instructions if needed. Normally, you should have received a log-in for [OnTheHub](https://e5.onthehub.com/WebStore/ProductsByMajorVersionList.aspx?cmi_mnuMain_child=5d1454c0-52a8-de11-886d-0030487d8897&cmi_mnuMain=4751da70-dd3c-df11-b4ab-0030487d8897&ws=2020165a-723a-de11-b696-0030485a8df0&vsro=8) and should be able to download ressources from them. Use either Dr. Schultz's webpage or OnTheHub to download the following programs.
#. If you're not running Windows (i.e., if your operating system is Debian, Android, MacOS, Red Hat, etc.), do the following. You can jump to the next step if you're running Windows.
    #. Install a [Virtual Machine](https://en.wikipedia.org/wiki/Virtual_machine). You can either get "VMware Fusion v8/10 for Mac" (only for MacOS), or download [Virtual Box](https://www.virtualbox.org/) (any operating system) from their website.
    #. Download a version of "Microsoft Operating Systems".
    #. Install and run your version of Windows from your virtual machine, and go to the next step.
 
#. [Compare](https://www.visualstudio.com/vs/compare/?rr=) the professional and enterprise editions of Visual Studio.
#. Download "Visual Studio 2017 (v15.5) Enterprise Web installer (exe)" (or the "Professional" edition).
#. Get the key for your software, by clicking on `Get VS 2017 Key` and entering your credentials for your Augusta account.
#. Install the software, leaving all the options on their default setting, but check the box next to "Workload" → "Windows" → ".NET-Desktop Development".
#. Configure the software as we did in ["Configuring Your Installation"](#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.

<!--
Pour augmenter la taille de la partition de Windows sous Virtual Box: 
VBoxManage modifyhd /home/caubert/VirtualBox\ VMs/Windows/Windows.vdi --resize 54816
-->
