UGTS Document #37 - Last Modified: 8/29/2015 3:23 PM
Visual Studio 2010 Solution and Project File Header Sequences

Visual Studio solution and project files (.SLN, .VBPROJ/.CSPROJ) have a 3 or 5-byte header EF BB BF [0D 0A], which is the UTF-8 BOM = byte order mark, followed by an optional CR LF newline sequence.

The Visual Studio version selector, which is invoked when you double-click a solution or project file, previously (in version 2010 and earlier) would not load a file if the header was not present. On the other hand, if you were you bypass the Version Selector and open the project or solution file directly from Visual Studio, the files would load fine, and Visual Studio will make the necessary corrections to these files if you save them. This restriction has been removed in Visual Studio 2012 and higher.

Frequently, this header could get removed when you hand-edited a project or solution file in a text editor. To manually add it back, you can use a hex editor such as HxD in insert mode, or open the file directly from within Visual Studio and save the file again to disk. However now that Visual Studio 2012 has corrected the problem, my recommendation (as always) is to keep your tools sharp and use the latest version of Visual Studio.