cmake: fixed Windows C# bug where running CMake twice causes an error