Wednesday, February 6, 2013

Visual Studio Solution Files

Solution and project files are an essential part of working with Visual Studio. A solution is a grouping of one or more projects that work together to create an application. The project and status information pertaining to the solution are stored in two different solution files. 

Solution Files
The first file that Visual Studio creates is the ".sln" (solution) file. This is text-based file and can be placed under source code control and shared between users. This file stores information about the projects that make up this solution, source control settings, and other global settings that apply to all of the projects in the solution. The .sln file contains text-based information the environment uses to find and load the name-value parameters for the persisted data and the project VSPackages it references. When a user opens a solution, the environment cycles through the preSolution, Project, and postSolution information in the .sln file to load the solution, projects within the solution, and any persisted information attached to the solution. Each project's file contains additional information read by the environment to populate the hierarchy with that project's items.

The second file is the ".suo" (solution user options) file, which stores user settings such as the location of your breakpoints. This file is stored in binary format. As this file contains user-specific information, it cannot be placed under source code control. The solution user options (.suo) file is a structured storage, or compound, file stored in a binary format. It is a hidden file in the same path as the .sln file

TIP: The simple resolution for the error "The project file has been moved renamed or not on your computer", is to delete ".suo" file. Visual Studio will create a new one when you open the solution and save it when you close the IDE. By deleting the file, you will lose any of your user-specific settings like breakpoints.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.