Original link
http://techblog.byllemos.com/2008/10/writing-an-automation-for-navision-in-c/
REGISTER
You can not registrate the automation directly through VS2008. Here you have to use regasm and gacutil. Regasm is a part of your framework, where as gacutil is a part of Microsoft SDK.
UNREGISTER
Ex. on a dos script for registring the automation:
set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe
set gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\gacutil.exe
%regasm% “myAutomation.dll” /tlb:myAutomation.tlb
%gacutil% /i “myAutomation.dll”
and an example for unregistring the automation:
@echo off
set regasm=%windir%\Microsoft.NET\Framework\v2.0.50727\regasm.exe
set gacutil=C:\program files\Microsoft SDKs\Windows\v6.0a\bin\gacutil.exe
REM Unregister types
%regasm% /unregister /tlb:myAutomation.tlb “myAutomation.dll”
%gacutil% /u “myAutomation”