- Create a strong key by running sn –k mykey.snk from the command line.
- Add the path of this generated file to your AssemblyInfo.vb or .cs file in the following manner:
VB.NET: <Assembly: AssemblyKeyFile("c:\path\mykey.snk")>
C#: [assembly: AssemblyKeyFile(@"c:\path\mykey.snk")] - After compiling your assembly to a DLL, you must register it for COM Interop from the command line: regasm c:\path\MyDll.dll /tlb:MyDll.tlb
- Finally, you should install the DLL into the Global Assembly Cache by dragging the .DLL file into the c:\windows\assembly folder
- VB.NET: <ClassInterface(ClassInterfaceType.AutoDual)>
- Verify, VB.NET: VB.NET: <GuidAttribute("BA713700-522D-466e-8DD4-225884504678")>
- Verify, VB.NET: Imports System.Runtime.InteropServices
Friday, May 06, 2005
VB RAD tips on .net interop
VB RAD
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment