Share via


Application Page, Project Designer (C#)

Use the Application page of the Project Designer to specify the project's application settings and properties.

To access the Application page, select a project node in Solution Explorer, and then, on the Project menu, click Properties. When the Project Designer appears, click the Application tab.

Note

Your computer might show different names or locations for some of the Visual Studio user interface elements in the following instructions. The Visual Studio edition that you have and the settings that you use determine these elements. For more information, see Visual Studio Settings.

General Application Settings

The following options enable you to configure general settings for the application.

  • Assembly name
    Specifies the name of the output file that will hold the assembly manifest. Changing this property will also change the Output Name property. You can also make this change from the command line by using /out (Set Output File Name) (C# Compiler Options). To access this property programmatically, see AssemblyName.

  • Default namespace
    Specifies the base namespace for files added to the project.

    It is also possible to clear the root namespace property, which enables you to manually specify the namespace structure of your project. See namespace (C# Reference) for more information about creating namespaces in your code.

    To access this property programmatically, see RootNamespace.

  • Target Framework
    Specifies the .NET Framework version that the application targets. This option can have the following values:

    .NET Framework 2.0

    .NET Framework 3.0

    .NET Framework 3.5

    The default setting is .NET Framework 3.5.

    Note

    The prerequisite packages listed in the Prerequisites Dialog Box are set automatically the first time that you open the dialog box. If you subsequently change the project's target framework, you will have to select the prerequisites manually to match the new target framework.

    For more information, see How to: Target a Specific .NET Framework and Visual Studio Multi-Targeting Overview.

  • Client-only Framework subset
    Specifies that the application targets the .NET Framework Client Profile, which provides a redistribution package that installs the minimum set of client assemblies on target computers, without requiring that the full .NET Framework be present. For more information, see .NET Framework Client Profile.

  • Output type
    Specifies the type of application to build. The options are as follows:

    • Windows Application

    • Console Application

    • Class Library

    In a Web Application project, this property can be set only to Class Library. See /target (Specify Output File Format) (C# Compiler Options) for more information.

    In a WPF Browser Application project, this option is disabled.

    To access this property programmatically, see OutputType.

  • Assembly Information
    Clicking this button displays the Assembly Information Dialog Box.

  • Startup object
    Defines the entry point to be called when the application loads. Generally this is set either to the main form in your application or to the Main procedure that should run when the application starts. Because class libraries do not have an entry point, their only option for this property is (Not Set).

    By default, in a WPF Browser Application project, this option is (Not set). The other option is Projectname.App. In this kind of project, you have to set the startup URI to load a UI resource when the application starts. To do this, open the Application.xaml file in your project and set the StartupUri property to a .xaml file in your project, such as Window1.xaml. For a list of acceptable root elements, see StartupUri. You also have to define a public static void Main() method in a class in the project. This class will appear in the Startup object list as ProjectName.ClassName. You can then select the class as the startup object.

    See /main (Specify Location of Main Method) (C# Compiler Options) for more information. To access this property programmatically, see StartupObject.

Resources

The following options enable you to configure general settings for the application.

  • Icon and manifest
    By default, this radio button is selected and the Icon and Manifest options are enabled. This enables you to select your own icon, or to select different manifest generation options. Leave this radio button selected unless you are providing a resource file for the project.

  • Icon
    Sets the .ico file that you want to use as your program icon. Click the ellipsis button to browse for an existing graphic, or type the name of the file that you want. See /win32icon (Import an .ico File) (C# Compiler Options) for more information. To access this property programmatically, see ApplicationIcon.

  • Manifest
    Selects a manifest generation option when the application runs on Windows Vista under User Account Control (UAC). This option can have the following values:

    • Embed manifest with default settings. Supports the typical manner in which Visual Studio operates on Windows Vista, which is to embed security information in the application's executable file, specifying that requestedExecutionLevel be AsInvoker. This is the default option.

    • Create application without a manifest. This method is known as virtualization. Use this option for compatibility with earlier applications.

    • Properties\app.manifest. This option is required for applications deployed by ClickOnce or Registration-Free COM. If you publish an application by using ClickOnce deployment, Manifest is automatically set to this option.

  • Resource File
    Select this radio button when you are providing a resource file for the project. Selecting this option disables the Icon and Manifest options.

    Enter a path name or use the Browse button (...) to add a Win32 resource file to the project.

See Also

Tasks

How to: Specify Assembly Information (Visual Basic, C#)

How to: Change an Assembly Name (Visual Basic, C#)

How to: Change the Application Type (Visual Basic, C#)

How to: Specify an Application Icon (Visual Basic, C#)

Other Resources

Managing Application Properties

Change History

Date

History

Reason

July 2008

Updated C#-specific content throughout.

Content bug fix.

July 2008

Added information about the Client-only Framework subset option.

SP1 feature change.