【发布时间】:2018-02-02 10:32:30
【问题描述】:
我正在尝试使用 Visual C++ 包装器在本机 C++ .exe 项目中实例化 C# 类。
C# 项目以 .Net 3.5 框架为目标,并且无法更改。 C++ 和 Visual C++ 项目都是使用 v100 编译器构建的。
但我仍然收到Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information。
我也试过添加
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
到 C++ 项目的 .vcxproj 文件的 <PropertyGroup Label="Globals"> 元素,但仍然是错误。
如果有人有想法,他/她会受到欢迎......
【问题讨论】:
标签: c# c++ .net wrapper compatibility