简体   繁体   English

VB / C#.NET和DataGridViewGrouper-如何使DLL在VB中运行?

[英]VB/C#.NET & DataGridViewGrouper - How to make the DLL run in VB?

I am refering to this: http://www.codeproject.com/Tips/995958/DataGridViewGrouper 我指的是: http : //www.codeproject.com/Tips/995958/DataGridViewGrouper

I want to use this DataGridViewGrouper on our VB.NET project. 我想在我们的VB.NET项目上使用此DataGridViewGrouper。

It's working fine when I am using it on a C# project, but it doesn't on a VB project. 当我在C#项目上使用它时,它工作正常,但在VB项目上却没有。

I am adding the DLL ( DataGridViewGrouper\\obj\\Debug\\DataGridViewGrouper.DLL ) as a reference to my project. 我将DLL(DataGridViewGrouper \\ obj \\ Debug \\ DataGridViewGrouper.DLL)添加为对我的项目的引用。 And yet, it complains that there is no namespace like "Subro". 但是,它抱怨没有像“ Subro”这样的名称空间。

I remember adding PostSHARP as a DLL to our project the same way, and it worked fine. 我记得以同样的方式将PostSHARP作为DLL添加到我们的项目中,并且工作正常。

What might be the reason this ain't be working? 这可能不起作用是什么原因?

Thank in advance. 预先感谢。

You need to check if the assembly is compatible with CLS. 您需要检查组件是否与CLS兼容。 Write [assembly: CLSCompliant(true)] in your code. 在您的代码中写入[assembly:CLSCompliant(true)]。 See more here 在这里查看更多

Also make sure that the version of NetFramework in your assembly is less or equal version of your main project 还要确保程序集中NetFramework的版本小于或等于主项目的版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM