Export (0) Print
Expand All

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 vs. Web Projects and Creating Web Projects.

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 Adding New Project Items.

The following tables list the available project items for local and Web projects. Note that for some project items, the file 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 extension does not distinguish between a Visual Basic project and a Visual C# project; that is, there is only one possible file extension for the project item.

Local Project Items

Project ItemFile ExtensionPurpose of the Project Item
Windows Form.vb or .csA form for creating Windows applications. For more information, see Creating Windows Forms.
Class.vb or .csA code file that contains a class declaration. For more information, see Classes.
Module (Visual Basic only).vbA file for storing groups of functions.
Component Class.vb or .csA class for creating components using the visual designer. For more information, see Component Classes.
User Control.vb or .csA class for creating a Windows Form control using the visual designer.
Data Form Wizard.vb or .cs (.aspx for Web projects.)A data form for Windows applications. For more information, see Data Form Wizard.
DataSet.xsdA file for creating an XML schema with DataSet classes. For more information, see Visual Studio Tools for Creating Datasets.
XML File.xmlA blank XML file. For more information, see XML Designer.
XML Schema.xsdA file for creating a schema for XML documents. For more information, see Introduction to XML Schemas.
Code File.vb or .csA blank code file.
Custom Control.vb or .csA class for creating a user-drawn Windows Form control. For more information, see Authoring Controls for Windows Forms.
HTML Page.htmAn HTML page that can include client-side code. For more information, see Design View, HTML Designer.
Inherited Form.vb or .csA new form based on an existing Windows Form. For more information, see Windows Forms Inheritance.
Web Custom Control.vb or .csA class for creating an ASP.NET server control. For more information, see ASP.NET Server Controls.
Inherited User Control.vb or .csA new control based on an existing Windows Form control. For more information, see Inheriting from Existing Windows Forms Controls.
Windows Service.vb or .csA class for creating Windows services. For more information, see Creating Windows Services.
COM Class.vb or .csA class that can be exposed to COM. For more information, see COM Interoperability in Visual Basic and Visual C#.
Transactional Component.vb or .csA class for use with transactional components.
Text File.txtAn empty text file.
Frameset.htmAn HTML file that hosts multiple HTML pages. For more information, see Introduction to Framesets.
XSLT File.xsltA file used to transform XML documents. For more information, see XSLT Developer's Guide.
StyleSheet.cssA cascading style sheet used for rich HTML style definitions. For more information, see Creating an External CSS Style Sheet.
Installer Class.vb or .csA class to be invoked at setup time. For more information, see Creating Installation Components.
Crystal Report.rptA Crystal Report file that publishes data to a Windows form. For more information, see Crystal Report Designer Overview.
Bitmap File.bmpA blank bitmap image file that can be used for creating simple images.
Cursor File.curA file for creating custom cursors. For more information, see Cursor Creation.
Icon File.icoAn image file for creating a custom icon. For more information, see Icons.
Assembly Resource File.resxA file used to edit and define application resources. For more information, see Resources in Applications.
Assembly Information File.vb or .csA file containing general assembly information. For more information, see Assemblies.
Application Configuration File.configA file used to configure application settings. For more information, see Configuration Files.
JScript File.jsA script file containing JScript code. For more information, see JScript Fundamentals.
VBScript File.vbsA script file containing VBScript code. For more information, see VBScript User's Guide.
Windows Script Host.wsfA file containing script that is run as a Windows program. For more information, see Using Windows Script Files.

Web Project Items

Project ItemFile ExtensionPurpose of the Project Item
Web FormTwo files: .aspx and either .vb for Visual Basic or .cs for Visual C#A form for creating Web applications. For more information, see Web Forms Pages.
Web ServiceTwo 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.
Mobile Web Form.aspxA form for creating mobile Web applications. For more information, see Creating ASP.NET Mobile Web Applications.
Class.vb or .csA code file that contains a class declaration.
Module (Visual Basic only).vbA file for storing groups of functions.
Component Class.vb or .csA class for creating components using the visual designer.
Data Form Wizard.aspx (.vb or .cs for local projects)A data form for Web applications. For more information, see Data Form Wizard.
DataSet.xsdA file for creating an XML schema with DataSet classes. For more information, see Visual Studio Tools for Creating Datasets.
Web User Control.ascxAn ASP.NET server control created using the visual designer. For more information, see Developing ASP.NET Server Controls.
Mobile Web User Control.ascxAn 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.
HTML Page.htmAn HTML page that can include client-side code. For more information, see Design View, HTML Designer.
Frameset.htmAn HTML file that hosts multiple HTML pages. For more information, see Introduction to Framesets.
Style Sheet.cssA cascading style sheet used for rich HTML style definitions. For more information, see Creating an External CSS Style Sheet.
XML File.xmlA blank XML file. For more information, see XML Designer.
XML Schema.xsdA file for creating a schema for XML documents. For more information, see Introduction to XML Schemas.
XSLT File.xsltA file used to transform XML documents. For more information, see XSLT Developer's Guide.
Web Custom Control.vb or .csA class for creating an ASP.NET server control. For more information, see ASP.NET Server Controls.
Code File.vb or .csA blank code file.
Static Discovery File.discoAn 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 Enabling Discovery for an XML Web Service.
Global Application Class.asaxSometimes 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. For more information, see The Global.asax File.
Web Configuration File.configASP.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. For more information, see Application Root Directory Configuration File (Web.config).
Text File.txtAn empty text file.
Installer Class.vb or .csA class to be invoked at setup time. For more information, see Creating Installation Components.
Crystal Report.rptA Crystal Report file that publishes data to a Web Form. For more information, see Crystal Report Designer Overview.
Bitmap File.bmpA blank bitmap image file that can be used for creating simple images.
Cursor File.curA file for creating custom cursors. For more information, see Cursor Creation.
Icon File.icoAn image file for creating a custom icon. For more information, see Icons.
Assembly Resource File.resxA file used to edit and define application resources. For more information, see Resources in Applications.
Assembly Information File.vb or .csA file containing general assembly information. For more information, see Assemblies.
JScript File.jsA script file containing JScript code. For more information, see JScript Fundamentals.
VBScript File.vbsA script file containing VBScript code. For more information, see VBScript User's Guide.
Windows Script Host.wsfAn empty code file used for Windows scripting. For more information, see Introduction to Windows Service Applications.

See Also

What's New in Projects | Visual Basic and Visual C# Projects

Show:
© 2014 Microsoft