According to the CMake documentation: https://cmake.org/cmake/help/latest/command/enable_language.html
CMake got CSharp support from version 3.8
Update this line:
cmake_minimum_required(VERSION 3.1)
To:
cmake_minimum_required(VERSION 3.8)