How do you develop a C# dll in Visual Studio 2010 that can be registered on another pc via regasm? [duplicate]

回眸只為那壹抹淺笑 提交于 2019-12-14 03:36:22

问题


Possible Duplicate:
regasm RA0000: No types were registered

I have a fairly simple component, strongly named and built into a dll file.

I give that file to a co-worker to register on his Windows 7 machine.

He uses the command: (from the location he has copied the file to)

regasm mycontrol.dll

And gets the reply

RegAsm : warning RA0000 : No types were registered.

Why?


回答1:


Has anyone actually developed a C# dll in Visual Studio 2010 that could be registered on another pc via regasm?

Yes, someone has done it.

Look at the documentaion on creating an interop DLL to see if there's a step you may have missed. A common problem is forgetting to set the ComVisible property to true in assemblyInfo.cs.

Some key sections:

Packaging an Assembly for COM

Qualifying .NET Types for Interoperation



来源:https://stackoverflow.com/questions/13161384/how-do-you-develop-a-c-sharp-dll-in-visual-studio-2010-that-can-be-registered-on

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!