[CMake] MSB4051

Anders Backman andersb at cs.umu.se
Mon Dec 27 10:03:16 EST 2010


Seems to be bug in CMake!

I reduce the solution down to 1 project. Still fails. So I copied the
generated .sln file into agx.cmake.sln

Then I marked the solution in VisualStudio and selected File->save agx.sln.

Now it works to build the whole solution.
So there is SOMETHING wrong with the .sln file that CMake generates, which
VisualStudio silently fixes when it saves the solution again.

I have attached the initial .sln file generated by CMake (2.8.3) and the
saved (from VisualStudio).

agx.sln - saved with VisualStudio File->Save agx.sln
agx.cmake.sln - As generated by CMake.

/A

On Mon, Dec 27, 2010 at 3:41 PM, Anders Backman <andersb at cs.umu.se> wrote:

> Hi all.
>
> Im using CMake 2.8.3 under windows 7 with Visual Studio 2010 32 bit.
>
> I have a rather large CMake configuration which has worked for a few years
> (VS2008).
> Now today I wanted to use VS2010 and suddenly ran into a problem.
>
> We use Incredibuild for a distributed build, and when I configure the
> project and do Incredibuild->Clean I get the error:
>
> Build started 2010-12-27 15:34:03.
>      0>A:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error
> MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
> project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
> this GUID was not found in the .SLN file.
>
>
> I reduced our project down from > 200 projects down to 4 and I still get
> the problem.
> To remove the uncertainty of using Incredibuild I instead used msbuild and
> I get the exact same problem:
>
> a:\projects\trunk_x86_vs2010>msbuild x.sln
> Microsoft (R) Build Engine Version 4.0.30319.1
> [Microsoft .NET Framework, Version 4.0.30319.208]
> Copyright (C) Microsoft Corporation 2007. All rights reserved.
>
> Build started 2010-12-27 15:34:16.
> a:\projects\trunk_x86_vs2010\x.sln.metaproj : Solution file error MSB4051:
> Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a project
> with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with this
> GUID was not found in the .SLN file.
>
> Build FAILED.
>
>   a:\projects\agx\trunk_x86_vs2010\x.sln.metaproj : Solution file error
> MSB4051: Project {6F41A287-5427-4997-A6F8-F56C774459AD} is referencing a
> project with GUID {13D5BF06-3AE9-4798-8955-3D15D7DB6A60}, but a project with
> this GUID was not found in the .SLN file.
>
>
> But it works if I build with VisualStudio BUILD->Clean (that is the
> ordinary clean inside the VS gui).
> I did some googling on it, and some indicated a missing EndProject in the
> .sln file, but I certainly cant see anything like that.
>
> Anyone with similar experience?
>
> /A
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101227/afee3457/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: agx.cmake.sln
Type: application/octet-stream
Size: 3153 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101227/afee3457/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: agx.sln
Type: application/octet-stream
Size: 2953 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101227/afee3457/attachment-0003.obj>


More information about the CMake mailing list