在c ++项目中调用c#dll

在c ++项目中调用c#dll

问题描述:

我只有一个C#dll,我想在我的C ++应用程序中使用C#dll中的函数。

我该怎么做?

I have a C# dll only and I want to make use the function in C# dll in my C++ application.
How can I do this ?

查看这篇文章在C / C ++中使用C#.NET ClassLibrary(DLL) [ ^ ]


推荐链接: http://support.microsoft.com/kb/310674 [ ^ ]



配置属性 - >一般,将公共语言运行时支持设置为公共语言运行时支持(/ clr)



通过添加引用对话框添加dll作为引用。

共同属性 - >框架和参考,选择添加新参考...并在浏览选项卡中选择dll。
Referred the link : http://support.microsoft.com/kb/310674[^]

In Configuration Properties -> General, set 'Common Language Runtime support' to 'Common Language Runtime support(/clr)'

Added the dll as reference by means of the Add Reference dialog box.
In Common Properties -> Framework and References, Select 'Add New Reference...' and In 'Browse' tab select the dll.