File Types and File Extensions in Visual Basic and Visual C#

Project items refer to the types of files you add to a project. The project items available to you differ, depending on whether you are working in a local project or a Web project. For more information, see Local and Web Projects.

Adding Project Items

The Add New Item dialog box is accessed through the Project menu. For more information about how to add items to your project, see How to: Add New Project Items.

The following tables list the available project items for local and Web projects. Notice that for some project items, the file name extension differs, depending on whether the item occurs in a Visual Basic project (indicated by .vb) or in a Visual C# project (indicated by .cs). For other project items, the file name extension does not distinguish between a Visual Basic project and a Visual C# project; that is, there is only one possible file name extension for the project item.

If you have installed Distributed Systems Designers, see the following for information about System Definition Model (SDM) information and Distributed System Designer file types:

Topic Location
Overview of the System Definition Model (SDM) Visual Studio Enterprise - User Interface

Local Project Items

Project Item

File Extension

Purpose of the Project Item

Windows Form

.vb or .cs or .jsl or .java

A form for creating Windows-based applications.

Explorer Form

.vb or .cs or .jsl or .java

An explorer form with a tree view and navigation controls.

MDI Parent Form

.vb or .cs or .jsl or .java

A form for a Multiple Document Interface application.

About Box

.vb or .cs or .jsl or .java

An About dialog box form for Windows-based applications.

Login Form

.vb or .cs or .jsl or .java

A logon form for collecting a username and password.

Splash Screen

.vb or .cs or .jsl or .java

A form preconfigured for use as a splash screen.

Dialog

.vb or .cs or .jsl or .java

A dialog box for Windows-based applications.

Class

.vb or .cs or .jsl or .java

A code file that contains a class declaration. For more information, see Classes in the Common Type System.

Interface

.vb or .cs or .jsl or .java

A new interface.

Module (Visual Basic only)

.vb

A file for storing groups of functions.

Component Class

.vb or .cs or .jsl or .java

A class for creating components using the visual designer. For more information, see Component Classes.

User Control

.vb or .cs or .jsl or .java

A class for creating a Windows Form control using the visual designer.

Windows Service

.vb or .cs or .jsl or .java

A class for creating Windows services. For more information, see How to: Create Windows Services.

DataSet

.xsd

A file for creating an XML schema with DataSet classes. For more information, see Writing DataSet Schema Information as XSD (ADO.NET).

SQL Database

.mdf

An empty SQL database for local data.

XML File

.xml

A blank XML file.

XML Schema

.xsd

A file for creating a schema for XML documents.

Settings File

.settings

A blank user-settings file.

Code File

.vb or .cs or .jsl or .java

A blank code file.

Custom Control

.vb or .cs or .jsl or .java

A class for creating a user-drawn Windows Forms control. For more information, see How to: Author Controls for Windows Forms.

HTML Page

.htm

An HTML page that can include client-side code. For more information, see Design View.

Inherited Form

.vb or .cs or .jsl or .java

A new form that is based on an existing form. For more information, see Windows Forms Visual Inheritance.

Inherited User Control

.vb or .cs or .jsl or .java

A new control that is based on an existing Windows Forms control. For more information, see How to: Inherit from Existing Windows Forms Controls.

Web Custom Control

.vb or .cs or .jsl or .java

A class for creating an ASP.NET server control. For more information, see ASP.NET Web Server Controls Overview.

COM Class

.vb or .cs

A class that can be exposed to COM. For more information, see COM Interoperability in .NET Framework Applications.

Transactional Component

.vb or .cs

A class for use with transactional components.

Text File

.txt

An empty text file.

XSLT File

.xslt

A file that is used to transform XML documents..

Installer Class

.vb or .cs or .jsl or .java

A class to be invoked at setup time. For more information, see Using Installation Components.

Crystal Report

.rpt

A Crystal Report file that publishes data to a Windows form.

Bitmap File

.bmp

A blank bitmap image file that can be used for creating simple images.

Cursor File

.cur

A file for creating custom cursors. For more information, see Cursor Creation.

Icon File

.ico

An image file for creating a custom icon. For more information, see Icons.

Resources File

.resx

A file that is used to edit and define application resources. For more information, see Resources in Applications.

Assembly Information File

.vb or .cs or .jsl

A file that contains general assembly information. For more information, see Assemblies in the Common Language Runtime.

Application Configuration File

.config

A file that is used to configure application settings. For more information, see Configuration Files.

Debugger Visualizer

.vb or .cs or .jsl or .java

A simple debugger visualizer

Class Diagram

.cd

A class diagram.

Report

.rdlc

A new empty report.

JScript File

.js

A script file that contains JScript code. For more information, see Getting Started With JScript.

VBScript File

.vbs

A script file that contains VBScript code. For more information, see VBScript User's Guide.

Windows Script Host

.wsf

A file that contains script that is run as a Windows-based application. For more information, see Using Windows Script Files (.wsf).

Web Project Items

Project Item

File Extension

Purpose of the Project Item

Web Form

Two files: .aspx and either .vb for Visual Basic or .cs for Visual C#

A form for creating Web applications.

Master Page

.master

A Master Page for Web Applications.

Web User Control

.ascx

An ASP.NET server control created using the visual designer.

HTML Page

.htm

An HTML page that can include client-side code. For more information, see Design View.

Web Service

Two files: .asmx and either .vb for Visual Basic or .cs for Visual C#

A component that provides the ability to exchange interoperable messages using standard protocols such as HTTP, XML, XSD, SOAP and WSDL. For more information, see Creating XML Web Services in Managed Code.

Class

.vb or .cs or .jsl

A code file that contains a class declaration.

Style Sheet

.css

A cascading style sheet used for rich HTML style definitions. For more information, see Working with CSS Overview.

Global Application Class

.asax

Sometimes called an asax file, this file enables you to write code to handle global ASP.NET application-level events such as Session_OnStart and Application_OnStart. The file has a name of global.asax, which you cannot change.

Web Configuration File

.config

ASP.NET uses this file to configure the Web settings for a Web project. The file has a name of Web.config, which you cannot change.

XML File

.xml

A blank XML file.

XML Schema

.xsd

A file for creating a schema for XML documents.

XSLT File

.xslt

A file that is used to transform XML documents.

Text File

.txt

An empty text file.

Assembly Resource File

.resx

A file that is used to edit and define application resources. For more information, see Resources in Applications.

Assembly Information File

.vb or .cs or .jsl

A file that contains general assembly information. For more information, see Assemblies in the Common Language Runtime.

SQL Database

.mdf

An empty SQL database for local data.

DataSet

.xsd

A file for creating an XML schema with DataSet classes. For more information, see Writing DataSet Schema Information as XSD (ADO.NET).

Generic Handler

.ashx

A page for implementing a generic handler

Site Map

.sitemap

A file that is used to create a site map.

Mobile Web Form

.aspx

A form for creating mobile Web applications. For more information, see Creating ASP.NET Mobile Web Applications.

Mobile Web User Control

.ascx

An ASP.NET server control created using the visual designer and used in a mobile Web application. For more information, see Creating ASP.NET Mobile Web Applications.

Mobile Web Configuration File

.config

ASP.NET uses this file to configure the Web settings for a mobile Web project. The file has a name of Web.config, which you cannot change. For more information, see Creating ASP.NET Mobile Web Applications.

Crystal Report

.rpt

A Crystal Report file that publishes data to a Web Form.

VBScript File

.vbs

A script file that contains VBScript code. For more information, see VBScript User's Guide.

JScript File

.js

A script file that contains JScript code. For more information, see Getting Started With JScript.

Windows Script Host

.wsf

An empty code file that is used for Windows scripting. For more information, see Introduction to Windows Service Applications.

Skin File

.skin

A file that is used to define an ASP.NET theme.

Browser File

.browser

A file for defining browser definitions

Report

.rdlc

A new empty report.

Module (Visual Basic only)

.vb

A file for storing groups of functions.

Component Class

.vb or .cs

A class for creating components using the visual designer.

Data Form Wizard

.aspx (.vb or .cs for local projects)

A data form for Web applications.

Frameset

.htm

An HTML file that hosts multiple HTML pages.

Web Custom Control

.vb or .cs or .jsl

A class for creating an ASP.NET server control.

Code File

.vb or .cs or .jsl

A blank code file.

Static Discovery File

.disco

An optional file that acts as a discovery mechanism for the Web service. The .disco file is not automatically created for a Web service.

Installer Class

.vb or .cs or .jsl

A class to be invoked at setup time. For more information, see Using Installation Components.

Bitmap File

.bmp

A blank bitmap image file that can be used for creating simple images.

Cursor File

.cur

A file for creating custom cursors. For more information, see Cursor Creation.

Icon File

.ico

An image file for creating a custom icon. For more information, see Icons.

See Also

Concepts

Default Project Templates in Visual Studio