It&#39;s better to use include_external_msproject with C# projects. After fixing bug <a href="http://public.kitware.com/Bug/view.php?id=13120">http://public.kitware.com/Bug/view.php?id=13120</a> it&#39;s possible to use:<br>
<br>include_external_msproject(Configurator ${CMAKE_SOURCE_DIR}/MyCSProject.csproj<br>    TYPE FAE04EC0-301F-11D3-BF4B-00C04F79EFBC<br>    PLATFORM &quot;Any CPU&quot;<br>    )<br><br>Additionally you can use configure_file to create file in $(SolutionDir) to pass information (like paths, configuration options, etc.) to msbuild and VS IDE.<br>
<br>The only drawback is that CMake sees these project as utility projects, so you can&#39;t use them in generator expressions. However you can link to them by adding dependencies.<br><br><div class="gmail_quote">On Wed, Aug 22, 2012 at 3:03 PM, Gerhard den Hollander <span dir="ltr">&lt;<a href="mailto:gdenhollander@fugro-jason.com" target="_blank">gdenhollander@fugro-jason.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We have a large code base, that consists of a large number of C++ file<br>
and a smaller number of C# files.<br>
<br>
Most fo the C++ code is being build using CMake,<br>
the C# code is build using the msbuild tools.<br>
<br>
I know that currently there is no C# support planned in CMake,<br>
but reading through the google results, it sounds like people have had<br>
various degrees of success using custom_command(..) or other CMake<br>
tricks to kick of C# builds using msbuild/devenv.<br>
<br>
For those who have succesfully build mixed code projects (so C# and<br>
C/C++ ), would you mind explainign how this is done ?<br>
<br>
Preferably with some example CMake files ?<br>
<br>
Thanks<br>
<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br>