Below, the method i' ve created is working for registering. But i get: "regasm : warning ra0000 : no types were unregistered" for unregistering.
private static void ExecuteRegAsm(string comObjectPath, string typeLibraryName, string regAsmPathToExecute, string regAsmParameter = null)
{
var startInfo = new ProcessStartInfo
{
CreateNoWindow = false,
UseShellExecute = false,
FileName = regAsmPathToExecute,
WindowStyle = ProcessWindowStyle.Hidden
};
switch (regAsmParameter)
{
case null:
startInfo.Arguments = comObjectPath + " /tlb:" + typeLibraryName + " /Codebase";
break;
case "/u":
case "-u":
startInfo.Arguments = "/u " + comObjectPath;
break;
}
using (var exeProcess = Process.Start(startInfo))
{
if (exeProcess != null) exeProcess.WaitForExit();
}
}
How to solve this issue?