Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Our project structure is like,

native.dll :- This contains pure native code written in cc++. This native.dll exposes some functions using *def file.

Wrapper Library(wrapper.dll compiled with .Net framework v4.0) :- In order to use functionality of native.dll, a Wrapper lib(wrapper.dll) is written in C++CLI using :clroldsyntax. This wrapper has all code of Interoperability and Marshalling.

Application(Console App v4.0) directly uses wrapper.dll to use functionality provided by native.dll.

Now this project needs to run in .Net Core. This means we will have an .Net Core application that will reference wrapper.dll that in turn will refer native.dll.

I know this will not directly work. But the issue is whether .Net Core(CoreCLR) supports C++CLI (clroldsyntax) runtime environment ?

If no, what can be the possible solutions to this application work ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
204 views
Welcome To Ask or Share your Answers For Others

1 Answer

whether .Net Core(CoreCLR) supports C++CLI (clroldsyntax) runtime environment ?

As far as I know there is no plan to support C++/CLI with .NET Core.

If no, what can be the possible solutions to this application work ?

You can (should) provide a C API. Mono e. g. supports P/Invoke and .NET Core also supports P/Invoke (see also this Stack overflow question and this DllMap related ticket).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...