[CMake] Visual Studio 10 with external project dependencies - error MSB4192

Neil MacMullen neil.macmullen at neul.com
Fri Apr 8 11:44:08 EDT 2011


I've now made considerable progress with creating a cmake configuration for a managed (CLR) project which also links to external managed dlls.  I can use msbuild  on ALL_BUILD.vcxproj  to successfully create an executable etc.

Only one minor issue remains; I'd like to open the cmake-generated solution file in visual studio to allow debugging and browsing of the solution (including external project dependencies).  Unfortunately, something in the solution file is convincing  visual studio that it has been generated by an obsolete version and needs to be 'converted'.   If I use msbuild on the solution file I get the following error which is a strong clue....

C:\work\software\main\Neul\products\basestation\builds\Emulation>msbuild Basestation.sln
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.225]
Copyright (C) Microsoft Corporation 2007. All rights reserved.

Build started 08/04/2011 16:22:52.
C:\work\software\main\Neul\products\basestation\builds\Emulation\Basestation.sln : error MSB4192: The project file "..\..\..\..\libraries\EthernetBus\EthernetBus.csproj" is in the ".vcproj" file format, which MSBuild no longer supports. Please convert the project by opening it in the Visual Studio IDE or running the conversion tool, or use MSBuild 3.5 or earlier to build it.

Build FAILED.


Now, it's most certainly the case that EthernetBus.csproj is NOT in the 'vcproj' format which I can easily verify by going and building it directly.  However, something about the layout of the solution file is confusing visual studio.  Inspecting it by eye and comparing to a working solution which also includes EthernetBus.csproj doesn't reveal any 'obvious' problems; the GUID has been correctly inserted in the solution etc.  The section

                GlobalSection(ProjectConfigurationPlatforms) = postSolution

Contains win32 rather than "Any CPU" targets but even replacing these by hand isn't enough to remove the msbuild error.

Anybody managed to work around this ?

Note, the project/solution was generated using the "Visual Studio 10" generator.

  Thanks,
           Neil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110408/32c73e0a/attachment-0001.htm>


More information about the CMake mailing list