Export (0) Print
Expand All

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

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 and Guided Tour of Creating Web Sites in Visual Studio.

Adding Project Items

The Add New Item dialog box is accessed through the Project menu. For more information about adding 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 extension differs, depending on whether the item occurs in a Visual Basic project (indicated by .vb), in a Visual C# project (indicated by .cs), or in a Visual J# project (indicated by .jsl). For other project items, the file extension does not distinguish between a Visual Basic project, a Visual C# project, and a Visual J# project; that is, there is only one possible file extension for the project item.

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

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 login 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 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 XML Schema (XSD).

SQL Database

.mdf

An empty SQL database for local data.

XML File

.xml

A blank XML file. For more information, see XML Schema Designer (XML Designer).

XML Schema

.xsd

A file for creating a schema for XML documents. For more information, see Introduction to XML Schemas (XML Designer).

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 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 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 (Visual Studio).

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 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 used to edit and define application resources. For more information, see Resources in Applications.

Assembly Information File

.vb or .cs or .jsl

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

Application Configuration File

.config

A file 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 containing JScript code. For more information, see Getting Started With JScript.

VBScript File

.vbs

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

Windows Script Host

.wsf

A file containing script that is run as a Windows program. 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# or .jsl for Visual J#

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# or .jsl for Visual J#

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 How to: Create External Cascading Style Sheets (Visual Studio).

Global Application Class

.asax

Sometimes called an asax file, this file allows 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. For more information, see XML Schema Designer (XML Designer).

XML Schema

.xsd

A file for creating a schema for XML documents. For more information, see Introduction to XML Schemas (XML Designer).

XSLT File

.xslt

A file used to transform XML documents..

Text File

.txt

An empty text file.

Assembly Resource File

.resx

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

Assembly Information File

.vb or .cs or .jsl

A file containing 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 XML Schema (XSD).

Generic Handler

.ashx

A page for implementing a generic handler

Site Map

.sitemap

A file 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 containing VBScript code. For more information, see VBScript User's Guide.

JScript File

.js

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

Windows Script Host

.wsf

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

Skin File

.skin

A file 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. For more information, see ASP.NET Web Server Controls (Visual Studio).

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 XML Web service. The .disco file is not automatically created for an XML Web service. For information on creating a discovery file for your XML Web service, see How to: Enable Discovery for XML Web Services.

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

Community Additions

ADD
Show:
© 2014 Microsoft