Last post Jul 27, 2011 12:27 AM by jacobambat
Jun 30, 2011 11:28 AM|B_WILL|LINK
I was directed to update an old VB6 dll to VB .net as we are moving away from COM objects. The dll contains one function that does a bunch of high math calculations. I opened up a new class project in VS 2005, Imported System.Math, and then basically copied
the function code from the VB6 project into the new class. When compiling, I made the assemble COM-Visible and also checked the Register for COM Interop in the project properties. I then copied the dll and tlb files to Windows/system32 and tried to register
using Regasm.exe. Even though I'm using the correct version for .Net 2, I still get error RegAsm : error RA0000 : Failed to load 'C:\WINDOWS\system32\eagetairmiles.dll' because it is not a valid .NET assembly. When attempting to add a reference to it in
my new .Net project, I see it in the COM tab - but in the location it was developed in, and I receive the following error: Converting the type library to a .Net assembly failed. Type library mydllname was exported from a CLR assembly and cannot be re-imported
as a CLR assembly.
I did all this by following directions from various resources found via a Google search. I have no idea how to make this work, or what harm I may have caused hacking at it all day. Any assistance would be appreciated!
Jun 30, 2011 12:35 PM|qwe123kids|LINK
There is No Substitue for Logic.
Better Option Would Be Try to understand Logic of Vb6.0 and Then Write Code in .Net
Donot try to Blindly Copy The Code of Vb and Try to use in .net.
Go Slow Step by Step 1 by 1.
it will help You in Long Run.
as far Registering of Dll is Concern of .net dll you have to do "Gacutil" for That.
Jun 30, 2011 12:50 PM|B_WILL|LINK
I completly understand the logic in the old dll - it is a math calculation for air miles. The project compiles as I expected it would. This has nothing to do with my question. What the heck is Gacutil?
Jul 27, 2011 12:27 AM|jacobambat|LINK
Gacutil is used to add assembly to Global Assembly Cache.