faqts : Computers : Software : Microsoft : .NET : Visual Studio

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 32 people (63%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Microsoft: .NET: Visual Studio: File: Project: Solution: Structure: What is format of .sln file?

Jan 9th, 2004 12:33
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 09 January 2004 - 05:42 pm --------------------

Microsoft: .NET: Visual Studio: File: Project: Solution: Structure: 
What is format of .sln file?


---

By loading a few (ASP.NET) .sln files, and looking at their format:

---

Note:

This format differs slightly between Microsoft Visual Studio 2002 and 
2003.

---
---

Format in general:

---
---

Microsoft Visual Studio Solution File, Format Version <your visual 
studio version number>

Project( "<some unique registry key>" ) = "<your project 
name1>", "<your project path1 and filename1>", "<some unique Windows 
registry stored identifier for your project1>"
EndProject

Project( "<some unique registry key>" ) = "<your project 
name2>", "<your project path2 and filename2>", "<some unique Windows 
registry stored identifier for your project2>"
EndProject

...

Project( "<some unique registry key>" ) = "<your project 
namelast>", "<your project pathlast and filenamelast>", "<some unique 
Windows registry stored identifier for your projectlast>"
EndProject

Global

        ---

        GlobalSection( SourceCodecontrol ) = preSolution or 
postSolution

         CanCheckoutShared = true or false

         SccLocalPath<some number> = <some local path>

         SccNumberOfProjects = <some number of projects>

         SccProjectFilePathRelativizedFromConnection1 = <some project 
path>

         SccProjectName<some number> = <some project path>

         SccProjectUniqueName<some number> = <some project name path>

         SccProvider<some number> = MSSCCI:<some provider>

         SolutionUniqueID = <some unique registry number>

	EndGlobalSection

        ---

	GlobalSection( SolutionConfiguration ) = preSolution

		ConfigName.0 = Debug

		ConfigName.1 = Debug1

		ConfigName.2 = PostCMD

		ConfigName.3 = PostExplorer

		ConfigName.4 = Release

	EndGlobalSection

        ---

	GlobalSection(ProjectDependencies) = postSolution

	EndGlobalSection

        ---

	GlobalSection(ProjectConfiguration) = postSolution

	 <some unique identifier1>.Debug.ActiveCfg = Debug|.NET
	 <some unique identifier1>.Debug.Build.0 = Debug|.NET
	 <some unique identifier1>.Release.ActiveCfg = Release|.NET
	 <some unique identifier1>.Release.Build.0 = Release|.NET

	 <some unique identifier2>.Debug.ActiveCfg = Debug|.NET
	 <some unique identifier2>.Debug.Build.0 = Debug|.NET
	 <some unique identifier2>.Release.ActiveCfg = Release|.NET
	 <some unique identifier2>.Release.Build.0 = Release|.NET

         ...

	 <some unique identifierlast>.Debug.ActiveCfg = Debug|.NET
	 <some unique identifierlast>.Debug.Build.0 = Debug|.NET
	 <some unique identifierlast>.Release.ActiveCfg = Release|.NET
	 <some unique identifierlast>.Release.Build.0 = Release|.NET

	EndGlobalSection

        ---

	GlobalSection(ExtensibilityGlobals) = postSolution

	EndGlobalSection

        ---

	GlobalSection(ExtensibilityAddIns) = postSolution

	EndGlobalSection

EndGlobal

---
---

Here the versions of this solution file =

 v7.0, if Microsoft Visual Studio 2002

 v8.0, if Microsoft Visual Studio 2003

---
---

Here some of the subsection meanings:

        GlobalSection( SOURCECODECONTROL ) = preSolution or 
postSolution
         //
         // used by the version control database
         // (e.g. using: Microsoft Source Safe).
         //
         // This section is only added if you are so using version 
control
         //
	EndGlobalSection

        ---

	GlobalSection( SOLUTIONCONFIGURATION ) = preSolution or 
postSolution
         //
         // for e.g. debug control
         //
	EndGlobalSection

        ---

	GlobalSection( PROJECTDEPENDENCIES ) = preSolution or 
postSolution
         //
         // usually empty
         //
         // This contains any explicit dependencies between the two or 
more projects
         // in this solution file
         // For implicit dependencies check the vbproj file
         //
	EndGlobalSection

        ---

	GlobalSection( PROJECTCONFIGURATION ) = preSolution or 
postSolution
         //
         // As much entries as there are projects in this solution file
         //
         // determines which project configurations will be built
         // in any particular solution configuration
         //
	EndGlobalSection

        ---

	GlobalSection( EXTENSIBILITYGLOBALS ) = preSolution or 
postSolution
         //
         // usually empty
         //
         // used for solution items
         //
         // Shows that solution items (like .html, .bmp, ... files)
         // which are used globally by two or more of the projects
         //
	EndGlobalSection

        ---

	GlobalSection( EXTENSIBILITYADDINS ) = preSolution or 
postSolution
         //
         // usually empty
         //
         // used for solution items
         //
         // Shows that solution items (like .html, .bmp, ... files)
         // which are used locally by this project
         //
	EndGlobalSection

---
---

Some specific examples:

a .sln file with 1 project:

Microsoft Visual Studio Solution File, Format Version 7.00
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") 
= "WebApplication1", "http://localhost/WebApplication1/WebApplication1.
vbproj", "{CAC13264-1D11-45A3-ACE6-F3D4723DFD6C}"
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		ConfigName.0 = Debug
		ConfigName.1 = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{CAC13264-1D11-45A3-ACE6-F3D4723DFD6C}.Debug.ActiveCfg 
= Debug|.NET
		{CAC13264-1D11-45A3-ACE6-F3D4723DFD6C}.Debug.Build.0 = 
Debug|.NET
		{CAC13264-1D11-45A3-ACE6-
F3D4723DFD6C}.Release.ActiveCfg = Release|.NET
		{CAC13264-1D11-45A3-ACE6-F3D4723DFD6C}.Release.Build.0 
= Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

---
---

A .sln file with 1 project:

---

Microsoft Visual Studio Solution File, Format Version 7.00
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") 
= "WebApplication25", "http://localhost/WebApplication25/WebApplication
25.vbproj", "{24A73141-8812-4CBB-B9D2-82CDBFA3E846}"
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		ConfigName.0 = Debug
		ConfigName.1 = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{24A73141-8812-4CBB-B9D2-82CDBFA3E846}.Debug.ActiveCfg 
= Debug|.NET
		{24A73141-8812-4CBB-B9D2-82CDBFA3E846}.Debug.Build.0 = 
Debug|.NET
		{24A73141-8812-4CBB-B9D2-
82CDBFA3E846}.Release.ActiveCfg = Release|.NET
		{24A73141-8812-4CBB-B9D2-82CDBFA3E846}.Release.Build.0 
= Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

---
---

A .sln file with 1 project:

---

Microsoft Visual Studio Solution File, Format Version 7.00
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") 
= "WebApplication34", "http://localhost/WebApplication34/WebApplication
34.vbproj", "{CA621411-1D91-4A2E-847F-8C430754630D}"
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		ConfigName.0 = Debug
		ConfigName.1 = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{CA621411-1D91-4A2E-847F-8C430754630D}.Debug.ActiveCfg 
= Debug|.NET
		{CA621411-1D91-4A2E-847F-8C430754630D}.Debug.Build.0 = 
Debug|.NET
		{CA621411-1D91-4A2E-847F-
8C430754630D}.Release.ActiveCfg = Release|.NET
		{CA621411-1D91-4A2E-847F-8C430754630D}.Release.Build.0 
= Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

---
---

A .sln file with 2 projects:

---

Microsoft Visual Studio Solution File, Format Version 7.00
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") 
= "WebApplication94", "http://localhost/WebApplication94/WebApplication
94.vbproj", "{F10185B8-843D-48EF-960B-49A0D7FC1ED1}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") 
= "WebApplication93", "http://localhost/WebApplication93/WebApplication
93.vbproj", "{300725A9-2B21-4AF1-9843-124D1EEB7A9E}"
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		ConfigName.0 = Debug
		ConfigName.1 = Release
	EndGlobalSection
	GlobalSection(ProjectDependencies) = postSolution
	EndGlobalSection
	GlobalSection(ProjectConfiguration) = postSolution
		{F10185B8-843D-48EF-960B-49A0D7FC1ED1}.Debug.ActiveCfg 
= Debug|.NET
		{F10185B8-843D-48EF-960B-49A0D7FC1ED1}.Debug.Build.0 = 
Debug|.NET
		{F10185B8-843D-48EF-960B-
49A0D7FC1ED1}.Release.ActiveCfg = Release|.NET
		{F10185B8-843D-48EF-960B-49A0D7FC1ED1}.Release.Build.0 
= Release|.NET
		{300725A9-2B21-4AF1-9843-124D1EEB7A9E}.Debug.ActiveCfg 
= Debug|.NET
		{300725A9-2B21-4AF1-9843-124D1EEB7A9E}.Debug.Build.0 = 
Debug|.NET
		{300725A9-2B21-4AF1-9843-
124D1EEB7A9E}.Release.ActiveCfg = Release|.NET
		{300725A9-2B21-4AF1-9843-124D1EEB7A9E}.Release.Build.0 
= Release|.NET
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
	GlobalSection(ExtensibilityAddIns) = postSolution
	EndGlobalSection
EndGlobal

---
---

Book: see also:

---

[book: Flanders, Jon / Griffiths, Ian / Sells, Chris -  Mastering 
Visual Studio .NET - Appendix E.  Solution and Project File Formats]

---

[book: Johnson, Brian / Skibo, Craig - Inside Microsoft Visual 
Studio .NET 2003 - Chapter 2.  Project Management in Visual 
Studio .NET]

---

[book: Hurwitz, Dan / Liberty, Jesse - Programming ASP.NET, 2nd 
Edition - Chapter 2.  Visual Studio .NET]

---
---

Internet: see also:

---

Microsoft: .NET: VisualStudio: File: Project: Solution: Add: How add 
projects to your solution file?
http://www.faqts.com/knowledge_base/view.phtml/aid/28115/fid/1600

---

Microsoft: .NET: Visual Studio: File: Project: Solution: What is 
solution file? [.sln]
http://www.faqts.com/knowledge_base/view.phtml/aid/27512/fid/1600

----------------------------------------------------------------------