Visual Studio 2010 C++/CLI in Static Library Mode: could not find assembly 'mscorlib.dll'

前端 未结 5 583
一向
一向 2021-02-05 14:49

I am working on a C++/CLI project with VS 2012 in Dynamic Library (.dll) and x64 mode.

If I switch the mode to Static Library, I get the error below.

Er

5条回答
  •  礼貌的吻别
    2021-02-05 14:54

    I had the same problem when converting my solution from the VS2010 compiler to VS2013 compiler.

    I resolved it by changing the project settings (for the project containing the managed .cpp file that was throwing this error) as follows: In Project Settings | C/C++ | General | Additional #using Directories I added the macro $(FrameworkPathOverride). This resolves to the reference assembly directory for the version of .NET that you're targeting, which in my case is C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5.1

提交回复
热议问题