Understanding different project files

Goal

In this tutorial you will learn about the common type of files which you will be working with while creating .net applications using Visual Studio

Common type of file extensions you will work with

When you create any type of project using Visual Studio there will be files with following extensions which will get created

  1. .csproj ( .vbproj if you chose VB.net as your coding language )
  2. .cs ( .vb if you chose VB.net as your coding language)
  3. .sln
  4. .config

.csproj or .vbproj files

The files with extension .csproj or .vbproj are the files with the complete project information. These project files tell Visual Studio all the folders and code files which are a part of the project. It is a normal text file and can be opened using any normal text editor. But when Visual Studio opens this file it asks about all the folders and files which are a part of the project and then loads them all when loading the project

.cs or .vb files

The files with extension .cs or .vb are the code files. You write all your code in these files. As C#, VB.net and all other .net programming languages are object oriented so you will see classes written inside these files. It’s a normal practice with .net developers to create a separate code file for each class they write. So instead of putting all your classes in the same code file it is a good practice to create one code file for each class, no matter how big or small your class is.

.sln

The file ending with .sln is called a solution file. You can think of this file as a master file which contains information about all the projects which for a solution. Lets take an example to understand the role of this file. Suppose you are creating a large software application for a school management system. For this application you will need to create multiple projects in Visual Studio. The solution file keeps a list of all the projects which related to a given application. When you want to work on the application you do not need to load all the projects individually inside Visual Studio every time. You just load the solution file and it will tell Visual Studio the location of all the project files which it should load. The project files will further tell Visual Studio the folders and code files which are a part of the project. So this way everything will get loaded inside Visual Studio for you to get started with your development fast.

.config

The file with extension is called the configuration file. You will either file App.config or web.config files with this extension. The purpose of both these files is the same, they hold some configuration information which the project uses during its working. Both app.config and web.config files can hold the same config information and the knowledge you have about once can be applied as it is to the other.

Quick Links

E-Magazines

@

Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..

Ok

Login to Open ESchool OR Create your account    Login   SignUp