Visual Studio 2013 Solution Format Version incorrect when resolving VisualStudioVersion in MSBuild

msbuildsolutionvisual-studio-2013

When creating a new Solution in Visual Studio 2013, the top of the file looks like:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0

Is this Format Version incorrect? VS2012 (v11) had a Format Version of 12.00, so why has Visual Studio 2013 (v12) not got a Format Version of 13.00?

This is causing issue with our build server because, according to this article (See #2):

http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx

The MSBuild VisualStudioVersion variable gets set using -1 the Format Version. Our build server only has VS2013 and associated tools (therefore installed in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0) but the build fails because the VisualStudioVersion is set automatically set to 11 and it looks in the wrong path (C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0)

Am I missing something or should the Format Version have been incremented with Visual Studio 2013?

Best Answer

The format version for Visual Studio 2013 is 12.0. If you have a build server that is not TFS2013, add in your build definition the following MSBuild Argument: /p:VisualStudioVersion=12.0