<div dir="ltr">Thanks David,<div>I'll have a look at that.  Here's my CMake script</div><div><br></div><div>```</div><div><div>cmake_minimum_required(VERSION 3.8.0)</div><div>project(add-in)</div><div><br></div><div>enable_language(CSHARP)</div></div><div>```</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 22, 2017 at 9:58 AM, David Cole <span dir="ltr"><<a href="mailto:DLRdave@aol.com" target="_blank">DLRdave@aol.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you looked into<br>
<a href="https://github.com/Kitware/CMake/blob/master/Modules/CMakeDetermineCSharpCompiler.cmake" rel="noreferrer" target="_blank">https://github.com/Kitware/<wbr>CMake/blob/master/Modules/<wbr>CMakeDetermineCSharpCompiler.<wbr>cmake</a><br>
?<br>
<br>
Send steps to reproduce the problem you're seeing... Maybe somebody<br>
else here has encountered the same thing and worked through it<br>
already.<br>
<br>
<br>
HTH,<br>
David C.<br>
<div><div class="h5"><br>
<br>
<br>
On Wed, Mar 22, 2017 at 12:33 PM, Wesley Smith <<a href="mailto:wesley.hoke@gmail.com">wesley.hoke@gmail.com</a>> wrote:<br>
> Hi,<br>
> I'm trying to diagnose why enable_language(CSHARP) isn't working for me in<br>
> the RC candidate. I've built CMake from source and am trying to step through<br>
> the code, but am coming up against the fact that this is an enormous project<br>
> and I don't quite know where to look.<br>
><br>
> The new C# support is something I want to use on an upcoming project, so I'd<br>
> like to help solve any issues with it<br>
><br>
> Here's where I'm at:<br>
><br>
><br>
> * I'm stepping through cmGlobalGenerator.xx in the EnableLanguage function.<br>
> When the only language is CSHARP, I'm erroring out where it attempts to get<br>
> the definition of CMAKE_SHARP_COMPILER<br>
><br>
> * In CMakeErrr.log, I see:<br>
> The CSharp compiler identification could not be found in<br>
> "C:/Users/wes/Documents/<wbr>GitHub/add-in/build_/<wbr>CMakeFiles/3.8.20170317-<wbr>g45851/CompilerIdCSharp/<wbr>CompilerIdCSharp.csproj"<br>
><br>
> When I compile and run this project by hand, I'm seeing<br>
><br>
> InfoCompiler<br>
> "INFO:compiler[Microsoft Visual Studio]"<br>
> InfoPlatform<br>
> "INFO:platform[Windows]"<br>
> InfoArchitecture<br>
> "INFO:arch[x64]"<br>
> InfoCompilerVersion<br>
> "INFO:compiler_version[2017]"<br>
><br>
> printed from this code:<br>
><br>
> static void Main(string[] args)<br>
>         {<br>
>             // we have to print the lines to make sure<br>
>             // the compiler does not optimize them away ...<br>
>             System.Console.WriteLine(<wbr>InfoCompiler);<br>
>             System.Console.WriteLine(<wbr>InfoPlatform);<br>
>             System.Console.WriteLine(<wbr>InfoArchitecture);<br>
>             System.Console.WriteLine(<wbr>InfoCompilerVersion);<br>
>         }<br>
><br>
><br>
> It all looks good to me.  What I haven't been able to find is where the<br>
> project is compiled and run from within CMake and the console stdout read in<br>
> order to verify the C# compiler settings.<br>
><br>
><br>
> thanks,<br>
> wes<br>
><br>
><br>
</div></div>> --<br>
><br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>support.html</a><br>
> CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
> CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/<wbr>training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/cmake-developers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/cmake-<wbr>developers</a><br>
</blockquote></div><br></div>