Marc-Christian Schulze
Marc-Christian Schulze

Reputation: 3254

MSBuild - Solution file error MSB5010: No file format header found

I'm currently trying to build my C# code within a virtual machine.
The code compiles fine on my local computer (Win7, 64bit, Visual Studio 2008 Prof).
On my virtual machine (Win7, 64bit, Visual Studio 2008 Prof) the same project file fails to build with the following error:

Solution file error MSB5010: No file format header found.

MSBuild (local machine):

Microsoft (R)-Buildmodul, Version 3.5.30729.5420
[Microsoft .NET Framework, Version 2.0.50727.5456]

MSBuild (virtual machine):

Microsoft (R)-Buildmodul, Version 3.5.30729.5420
[Microsoft .NET Framework, Version 2.0.50727.5456]

The start of the project file looks like the following:

<empty line>
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = [...]

As far as the version output of MSBuild is correct I'm using the same version of MSBuild.

But why is the build failing on one machine while it is doing well on my local? o.O

Update
I removed the empty line which led to another error:

Microsoft (R)-Buildmodul, Version 3.5.30729.5420
[Microsoft .NET Framework, Version 2.0.50727.5456]
Copyright (C) Microsoft Corporation 2007. Alle Rechte vorbehalten.

Project.sln(44): Solution file error MSB5008: 
Error parsing the solution configuration section in solution file. 
The entry "" is invalid.

Update
Does the language of Visual Studio matter? On my local machine I got an english installation while a german one is installed on the virtual machine.

Upvotes: 3

Views: 6309

Answers (1)

Matthew Brubaker
Matthew Brubaker

Reputation: 3117

Ensure that the line endings are set to Windows Style (CRLF) and not Unix Style (LF). They can get changed inadvertently during checkout from your source control if it is not set up correctly.

See this question for further info on setting the SVN line ending property.

Upvotes: 2

Related Questions