Udostępnij za pośrednictwem


Modifying Project Properties (Visual C#)

After you create a project, you can use the Project Designer to perform tasks such as change the name of your executable file, customize the build process, add a reference to a DLL, or strengthen the security settings. You can access the Project Designer in three ways:

  • Click Properties on the Project menu

  • Right-click the Properties item in Solution Explorer and then click Open.

  • Right-click the project in Solution Explorer and then click Properties.

The Project Designer will appear in the editor/designer window as shown in the following illustration:

Application property page

Project properties are grouped into 12 pages in the Project Designer. The Project Designer property pages are located in the same middle pane used by the Windows Forms Designer and code editor.

Note

Visual Studio Team System includes an additional property page for Code Analysis.

In the previous illustration, the Application property page is displayed. By clicking the labels on the left tab (Build, Build Events, Debug, and so on) you can access the corresponding property page. The project-specific information that is entered here is stored in a .csproj file which you cannot see in Solution Explorer, but it is located in the project folder on the drive. While you are working in Visual C#, you can access help for any property page by positioning the pointer on the page and pressing F1.

The following table provides a brief description of each page in the Project Designer:

Property Page

Description

Application

Change the name of the assembly, the project type, assembly information including version number, and other resource options. For more information, see Application Page, Project Designer (C#).

Build

Change the location in which the compiled assembly is stored, conditional compilation options, how errors and warnings are handled, and other settings. For more information, see Build Page, Project Designer (C#).

Build Events

Create and modify custom build steps. For more information, see Build Events Page, Project Designer (C#).

Debug

Specify the command-line arguments when you run under the debugger, and other settings. For more information, see Debug Page, Project Designer.

Resources

Add strings, icons, images, or other types of files to your project as resources. For more information, see Resources Page, Project Designer.

Services

Enable and configure client application services for your project. For more information, see Services Page, Project Designer.

Settings

Store settings such as connection strings for a database or the color-scheme that a particular user wants to use. These settings can be retrieved dynamically at run time. For more information, see Settings Page, Project Designer.

Reference Paths

Specify the path where assemblies referenced in your project are located. For more information, see Reference Paths Page, Project Designer (C#).

Signing

Specify ClickOnce certificate options, and provide strong name for your assembly. For more information, see Signing Page, Project Designer and ClickOnce Deployment Overview.

Security

Specify security settings that your application requires in order to run. For more information, see Security Page, Project Designer.

Publish

Specify options for distributing your application to a Web site, ftp server, or file location. For more information, see Publish Page, Project Designer.

Code Analysis (Visual Studio Team System only)

Options for tools that analyze your source code for potential security issues, adherence to .NET Framework design guidelines, and more. For more information, see Code Analysis, Project Designer.

See Also

Concepts

Introduction to the Project Designer

Other Resources

Using the Visual C# IDE

Application Development in Visual Studio