Visual Studio Help - "Projects"


Table of Contents

 


Introduction

For most programming with Visual Studio you will want to create and use "projects".  Projects are the way that Visual Studio organizes and maintains the various files used for a program.  Some of these files are the files that you create for your C code.  Other files include the "object" files created by the compiler when you code is compiled, the "executable" file (*.exe) that Visual Studio creates by linking your compiled code with other code, libraries, etc. that are needed to run your program, and miscellaneous files that are used by Visual Studio to organize and keep track of the status of your project.


Creating a New Project

To create a new project:


Creating and Adding Files to a Project

Before creating and adding files to a project be sure you have created a project and the project is open.  If the project is not open, open the project first.

To begin adding files to a project:


Making an Executable File ("Building" a Project)

Before you can run a program you must have created a project and added files to the project.  To compile, link and run, i. e. to "build" you program first be sure the project is open.

To "build" a project:

    Compiling files:

   Although we can just begin by building a project in one operation, we will be gin by first compiling the individual files.  During compilation Visual Studio will check for errors and if none are detected, intermediate (object code) files will be created.

    Linking ("building") the program:

    Running your program:


Opening a Project

Once you have created a project you can open it again later as follows:

  1. Go to the File menu and choose Open Workspace.  A standard Windows dialog box for opening files should be displayed.
  2. Choose the project you have previously created.  The project should have the name you gave it with the filename extension "dsw".  Thus, if you gave your project the name "My Project", it should appear with the file name My Project.dsw.
  3. Click on the OK button to dismiss the dialog once you have entered the project name.   You should then be able to continue working on the project where you left off.

../../../images/tex-logo-small.gif (1667 bytes)Wright | CE311K Civil Engineering | UT Austin../../../images/tex-logo-small.gif (1667 bytes)