I upgraded X# from version 2.9.1.1 to X# 2.12.2.1. When compiling a working project, I got a preprocessor error:
Error XS9003 Pre-processor: #endregion directive without matching #region found
The opening directive "region" of course exists.
I added an example project where the situation is reproduced:
TestConsoleApplication.zip