error LNK2022: metadata operation failed (801311E4) : Duplicate managed types have different visibilities

You will stumble upon this error if you are migrating your C++/CLI project from Visual Studio 2010 to Visual Studio 2012. One scenario for this error is when you are setting a different visibility for a native element and another include file has already set another visibility. Something like… #include <anotherinclude.h>#pragma make_public(g_SomeNativeType) Here you are […]
Continue reading…