VS: CMake is missing v142 toolset CSharp flag table
I have no idea what Flag Tables are and why they are needed, but there seems to be a problem that one of those flag tables files is missing. The problem appears when trying to use add_subdirectory on projects using some mixed C++/Cli and CSharp.
project(ProjectName LANGUAGES C CXX CSharp)
The fix was to create a copy of the v141_CSharp.json in that FlagTables folder and rename it to v142_CSharp.json. If that's all there is to fix this issue, I would also be willing to create a pull request for it.
1> [CMake] -- add_subdirectory(SomeFolder)
1> [CMake] -- The CSharp compiler identification is Microsoft unknown 9999
1> [CMake] -- The CSharp compiler version is 3.3.1
1> [CMake] -- Check for working C# compiler: E:/VS 2019 Professional/MSBuild/Current/Bin/Roslyn/csc.exe
1> [CMake] CMake Error in K:/_CM/.cache/de46f986-66b1-9c34-aa44-e533cd651321/build/D/CMakeFiles/CMakeTmp/CMakeLists.txt:
1> [CMake] JSON flag table "E:/VS 2019
1> [CMake] Professional/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake 3.15/Templates/MSBuild/FlagTables/v142_CSharp.json" could not be loaded.
I first thought that this is a Visual Studio issue, but a local CMake installation has the same problem.