是否支持C ++/CLI项目引用.net核心dll? [英] Is there support for C++/CLI project to reference .net core dlls?

查看:174
本文介绍了是否支持C ++/CLI项目引用.net核心dll?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

C ++/CLI项目可以引用使用.net核心创建的类库吗?  

Can C++/CLI project reference class library which is created using .net core?  

引用.net核心类库的C ++/CLI项目(包装器)将成功构建.使用包装器的C ++客户端也将生成.但是,在运行时,将引发以下错误:" System.TypeLoadException:可以 不会从程序集"System.Private.CoreLib"中加载类型"System.Object",因为父级不存在.  请告知我是否支持这种引用.

The C++/CLI project (wrapper) which references .net core class library will build successfully. The C++ client which consumes the wrapper will also build. But, at runtime, the following error is thrown: "System.TypeLoadException: Could not load type 'System.Object' from assembly 'System.Private.CoreLib' because the parent does not exist".  Please let me know if such referencing is supported.

推荐答案

截至24天前,
As of 24 days ago, no. More specifically you cannot target .NET Standard 1.x using C++/CLI. However with the .NET framework supporting .NET Standard 2.0 you might be able to, once it is released.


这篇关于是否支持C ++/CLI项目引用.net核心dll?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆