More Detail on the Project Files

 

A Closer Look at the Projects Folder: MSBuild Project Files

The architects of the IDE chose to give programmers two choices/formats for storing project files. You must make your choice at the time you create a new project in a window that looks like Figure 3-1.

image from book
Figure 3-1: New Project window

When the programmer accepts the default Create directory for solution option at the lower right of the screen, this is the way the files appear for a project named Thumbnail222:

  • Top level: One directory named Thumbnail222 and one file named Thumbnail222.sln. To initiate this project, the programmer clicks on the Thumbnail222.sln file, the solution file. The Thumbnail222.suo file is a computer-generated, machine code file.

  • Thumbnail222 directory: If the programmer clicks on this directory at the top level, this file listing appears:

    • bin directory

    • obj directory

    • Properties directory

    • Form1.cs file

    • Form1.Designer.cs file

    • Program.cs file

    • Thumbnail222.csproj file

    • Thumbnail222.csproj. user file

If you create project ThumbNail333 and uncheck the Create directory for solution option in the New Project window, the result is:

  • Top level: Three directories plus seven files appear:

    • bin directory

    • obj directory

    • Properties directory

    • Form1.cs file

    • Form1.Designer.cs file

    • Program.cs file

    • ThumbNail333.csproj file

    • ThumbNail333.csproj.user file

    • ThumbNail333.sln file

    • ThumbNail333.suo file

To initiate this project, the programmer clicks on the ThumbNail-333.sln file, the solution file. This file s location formulation places all the files that were included into one directory level rather than the two directory levels (created when you choose Create directory for solution ).

Warning  

Once you have selected an option, live with it, at least for the present project. If you move the solution file (ThumbNail XXX.sln) into a different directory tier (manually), all the pathing in the project goes awry.

One reason to choose the Create directory for solution option is so that you are confronted with only one file when the project is first opened ” the solution file, which is the one you click on to open the project. (The *.suo file is a machine-language file that belongs to the compiler ” you never touch it.)

If you allow all files to be placed on one directory level, then you have to pick out the solution file and click on it to open the project. Fortunately, the solution file will always be the next -to-the-last file near the bottom of the list.

 


Unlocking Microsoft C# V 2.0 Programming Secrets
Unlocking Microsoft C# V 2.0 Programming Secrets (Wordware Applications Library)
ISBN: 1556220979
EAN: 2147483647
Year: 2005
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net