Making sense of .NET file types
Wednesday, March 22, 2006 10:05 AM
Do you ever visit a public Web site and encounter a familiar file extension in the URL and immediately recognize what was used to develop the site? Most developers can relate to this situation. While HTML is the Internet standard, you may encounter .asp and wonder why the site developers are using old technology; if you spot .aspx, it may make you speculate on what version of ASP.NET the developers are using.
A recent conversation with a new .NET developer made me contemplate the many different file types for .NET and Visual Studio .NET (VS.NET). As a result, here is an overview of the various file types, with corresponding details on where and how they are used.
File types for VS.NET
Let's take a look at the files utilized by VS.NET, which is
by far the most popular IDE for .NET development. The following list provides
information about common files used by VS.NET (this list only covers C# and
VB.NET):
- .SLN: The VS.NET solution file. It includes information on what projects are included in the solution, as well as global build settings access via the solution properties window.
- .SUO: The VS.NET solution user options file. It stores user-specific settings for the solution. The source control integration package in VS.NET uses this file to store enlistment translation tables for Web projects, the offline statuses of projects, and other settings used for project bindings.
- .CSPROJ: A VS.NET C# project file. It contains project details such as references and includes, as well as name, version, guid, and so forth.
- .CSPROJ.USER: The user options for a C# project.
- .VBPROJ: A VS.NET VB.NET project file.
- .VBPROJ.USER: The user options for a VB.NET project.
Common development files
Whether developing a Web site, Windows service, or Windows
application, you may use the following file types:
- .vb: File containing VB.NET source code.
- .cs: File containing C# source code.
- .xsd: XML schema definition file, a data definition standard for XML. You may use these files to work with data sets as well as classes.
- .mdf: An empty SQL database for local data.
- .xml: An XML file and a data standard.
- .xslt: An XSLT file—a standard for transforming XML documents.
- .cd: A class diagram file.
- .js: A file containing JavaScript code.
- .vbs: A file containing VBScript code.
- .wsf: A file containing script that is run as a Windows program.
- .config: An application configuration file that may be used to store application settings. ASP.NET uses this file to configure the Web settings for a Web project; it uses a name of Web.config, which you cannot change.
- .resx: A file used to edit and define application resources.
- .ico: An image file for creating a custom icon.
- .rpt: A Crystal Reports file that may be published to a Web or Windows form.
- .txt: A simple text file.
While you may use these files regardless of the project type, there are specific file types for certain projects. For instance, you'll use the following file types in Web development projects.
File types for ASP.NET
ASP.NET development uses specific file types depending on
the resource used. The following list provides a good representation of the
file types that you may encounter during ASP.NET development:
- .aspx: A Web form that may include a code-behind file (.vb/.cs depending on the code used).
- .asax: This file allows you to write code to handle global ASP.NET application-level events. The file has a name of global.asax, which you cannot change.
- .ashx: A page for implementing a generic handler.
- .asmx: An ASP.NET Web service; it may include a corresponding code-behind file as well that includes its code.
- .htm: A standard HTML page.
- .css: A Cascading Style Sheet that may be used within the site.
- .sitemap: A Web application's site map.
- .skin: A file used to define an ASP.NET theme that may be used in the site.
- .browser: A browser definition 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.
- .ascx: A Web user control.
You may utilize other files that are not on this list depending on whether an application is compiled or how it is deployed.
Other files
If you choose to compile you application, an .exe file is
created in the default bin subdirectory of the project's main directory. Along
with the .exe file, a .pdb file is also included. A .pdb file holds debugging and project state information that
allows incremental linking of a Debug configuration of your program. It is
created during compilation, but you may disable it. Another file you may
encounter is an .act file used by Application Center
Test applications.
Know the environment
You now have some insight into the file types used by the
.NET Framework. One advantage to knowing the purpose of a particular file is
that, if a file is missing, you'll have a much better chance of recreating it
if you know what it does.




There are currently no comments for this post.