LNK2022 (Duplicate managed types have different visibilities) on MSVS 2012

后端 未结 5 720
悲&欢浪女
悲&欢浪女 2021-01-11 19:09

I\'m porting a solution from MSVS2005 to MSVS2012. The projects are in C++ .NET but use homemade native C++ libraires too. We had no problem building the projects with 2005

5条回答
  •  梦毁少年i
    2021-01-11 19:40

    Microsoft fixed this issue in hotfix: KB2848798.

    It helped me to migrate VS2010 solution to VS2012.

    You can download it here

    Relevant detail from above hotfix link: CLR issue 1

    Symptoms

    After you upgrade from Microsoft Visual Studio 2010 to Visual Studio 2012, some C++/CLI projects cannot build, and they report linker errors that resemble the following:

    MSVCMRTD.lib(mstart.obj) : error LNK2022: metadata operation failed (801311E4)

提交回复
热议问题