<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.avgcert, li.avgcert, div.avgcert
        {mso-style-name:avgcert;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>></span><span style='color:#1F497D'> Any ideas as to how to get cmake to generate (or find) an appropriate main GUID ? (Note that the second GUID “AE….48B” is correct and presumably read from the target project file.)<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Having had a quick delve into the source code, it looks like this is hard-coded (probably in cmGlobalVisualStudio7Generator::WriteProject though I’m away from my dev machine and can’t check). Will take a look at creating a patch next week.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Neil<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> cmake-bounces@cmake.org [mailto:cmake-bounces@cmake.org] <b>On Behalf Of </b>Neil MacMullen<br><b>Sent:</b> 08 April 2011 17:23<br><b>To:</b> cmake@cmake.org<br><b>Subject:</b> Re: [CMake] Visual Studio 10 with external project dependencies - error MSB4192<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='color:#1F497D'>Ok, a little more progress… . The generated solution contains a reference to the external project of the form.:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Project("{8AE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EthernetBus", "C:\work\software\main\Neul\libraries\EthernetBus\EthernetBus.csproj", "{AE1392AF-506E-4648-A389-FBCCBB29D48B}"<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>EndProject<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>The (first) problem is with the ‘main’ GUID (8AE04EC0-301F-11D3-BF4B-00C04F79EFBC). If I manually edit this GUID to the one from the reference solution (created directly by visual studio), the cmake-generated solution will now build. (Or at least, I can move on to the next problem which is that ProjectConfigurationPlatforms need tweaking to “Any CPU”).<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Any ideas as to how to get cmake to generate (or find) an appropriate main GUID ? (Note that the second GUID “AE….48B” is correct and presumably read from the target project file.)<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I probably should have mentioned before that I’m setting the dependency like this inside the cmakelist.txt file so no particular ‘magic’…<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> include_external_msproject(${PROJ_NAME} "${PPATH}")<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> add_dependencies(basestation ${PROJ_NAME})<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'> Neil <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> cmake-bounces@cmake.org [mailto:cmake-bounces@cmake.org] <b>On Behalf Of </b>Neil MacMullen<br><b>Sent:</b> 08 April 2011 16:44<br><b>To:</b> cmake@cmake.org<br><b>Subject:</b> [CMake] Visual Studio 10 with external project dependencies - error MSB4192<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>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….<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'>C:\work\software\main\Neul\products\basestation\builds\Emulation>msbuild Basestation.sln<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>Microsoft (R) Build Engine Version 4.0.30319.1<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>[Microsoft .NET Framework, Version 4.0.30319.225]<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>Copyright (C) Microsoft Corporation 2007. All rights reserved.<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'>Build started 08/04/2011 16:22:52.<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>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.<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'>Build FAILED.<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><p class=MsoNormal>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<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> GlobalSection(ProjectConfigurationPlatforms) = postSolution <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Contains win32 rather than “Any CPU” targets but even replacing these by hand isn’t enough to remove the msbuild error. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Anybody managed to work around this ?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Note, the project/solution was generated using the “Visual Studio 10” generator.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal> Thanks,<o:p></o:p></p><p class=MsoNormal> Neil<o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><hr size=1 width="100%" noshade style='color:#A0A0A0' align=center></span></div><p class=avgcert>No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>Version: 10.0.1209 / Virus Database: 1500/3558 - Release Date: 04/07/11<o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><hr size=1 width="100%" noshade style='color:#ACA899' align=center></span></div><p class=avgcert>No virus found in this message.<br>Checked by AVG - <a href="http://www.avg.com">www.avg.com</a><br>Version: 10.0.1209 / Virus Database: 1500/3558 - Release Date: 04/07/11<o:p></o:p></p></div></div></body></html>