/clr and /experimental:module are incompatible options

Solution 1:

The reason is that /clr compiler option of MSVC means that what you are compiling is not C++ but a different language C++/CLI. Lot of C++ and headers will be rejected under /clr option because it is not supported as C++/CLI.

The way to bypass it is that C++/CLI can #include headers written in (subset of) C++ and call things from it. So you can write your submodules that need to use C++ modules in C++ and provide interface as header files that C++/CLI can use.

Beware, that most such projects that are written in several different languages in mix tend to turn into chimera that does not work very well. Also maintainers capable to analyse an issue in it from end to end are harder to find.