When I use NetOffice to creates an Excel COM Addin whose assembly version is not 22.214.171.124 and register it using RegAsm.exe with /codebase option, an extra "CodeBase" registry value is created under a (non-exisitng) assembly version 126.96.36.199. When
unregistering it using RegAsm /unregister, the registry entries for the version 188.8.131.52 is left unremoved in the registry.
RegAsm creates a set of correct registry entries for the Assembly's correct version, as well as an extra entry for 184.108.40.206, so the registered COM Addin works. Also, unremoved registry entries do nothing critical (except for slightly wasting the registry.) So,
this is a relatively minor issue.
- Run NetOffice Developer Toolbox, choose VS Project Wizard, then create an Automation Addin project for Excel. (Leave other options as their default.)
- Open the generated project with Visual Studio.
- Open the property page for MyAssembly project, choose Application tab, click on Assembly Information..., then change the Assembly version to, say, 220.127.116.11.
- On Build tab, uncheck "Register for COM interop" so that VS doesn't update the registry.
- Build the solution to create MyAssembly.dll.
- Open an Administrator Command Prompt, cd to the directory where MyAssembly.dll resides, and run regasm MyAssembly.dll /codebase
- Run RegEdit and examine the entries below the COM Addin's CLSID.
Below the InprocServer32 registry key, I see two subkeys: 18.104.22.168 and 22.214.171.124. Below 126.96.36.199 there is a registry value "CodeBase". (Registry values below 188.8.131.52 are fine, BTW.)
See the attached .reg file for details. Lines 18 and 19 are unwanted. (I'm on 64 bit Windows and developing a 32 bit addin, so the registry keys are below Wow6432Node.)
Below the InprocServer32 registry key, I see only one subkey 184.108.40.206.
NetOffice.ExcelApi.Tools.COMAddin.RegisterFunction(Type) contains a code to add a "CodeBase", which I suspect is misbehaving. (Although I'm not sure it is really the cause of the issue nor what is the intended purpose of the code...)
Windows 7 (64 bit), .NET Framework 4.0, Visual Studio 2013 Express, NetOffice 1.6, Toolbox 1.2.