Unspecified Error registering com add-in

Add-in Express™ Support Service
That's what is more important than anything else

Unspecified Error registering com add-in
 
Michael Benowitz




Posts: 32
Joined: 2017-02-03
Hello,

I'm getting an error deploying my com add-in express version 9.3.4641.0. It was created in Visual Studio 2017 using add-in express

The log is below

Add-in Express Loader Log File: 06/14/2019 12:47:31:489

Startup directory: C:\Users\administrator.FUNDEZ\AppData\Local\FUND E-Z Development Corporation\FEZ14XLFX\
Loader version: 9.3.4641.0
Operating System: Microsoft Windows Server 2016 Standard Edition (build 14393), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\Microsoft Office\Office14\EXCEL.EXE"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): On
------------------------------------------------------------------------
12:47:31:489 3296 0388 The host's version is 14.0.4756.0
12:47:31:489 3296 0388 Creating a new instance of the XLL loader.
12:47:31:489 3296 0388 Loading mscoree.dll
12:47:31:489 3296 0388 INFO: Assembly codebase - C:\Users\administrator.FUNDEZ\AppData\Local\FUND E-Z Development Corporation\FEZ14XLFX\FUNDEZ14.XLFX.dll.
12:47:31:489 3296 0388 INFO: Assembly version - 14.1.1.0.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Getting the CLSID of the managed XLL class.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Loading the configuration from the system registry.
12:47:31:489 3296 0388 Getting the latest CLR version.
12:47:31:489 3296 0388 The latest CLR version is 'v4.0.30319'.
12:47:31:489 3296 0388 The configuration has been loaded successfully.
12:47:31:489 3296 0388 Runtime version: v4.0.30319.
12:47:31:489 3296 0388 Assembly name: FUNDEZ14.XLFX, PublicKeyToken=853124717664a2c9.
12:47:31:489 3296 0388 Class name: FUNDEZ14_XLFX.XLLModule.
12:47:31:489 3296 0388 Registry key: CLSID\{B14A1D48-4DEA-3735-9769-06DBDFB84969}.
12:47:31:489 3296 0388 Attempting to create a new instance of the managed XLL class: CLR - v4.0.30319
12:47:31:489 3296 0388 Loading CLR: v4.0.30319.
12:47:31:489 3296 0388 Calling CLRCreateInstance method.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Calling GetRuntime method.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Checking if the hosting API of .NET Framework v4.0 beta is installed.
12:47:31:489 3296 0388 The hosting API is up to date.
12:47:31:489 3296 0388 Calling SetDefaultStartupFlags method.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Calling GetInterface method for the CorRuntimeHost interface.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Starting CLR...
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Getting the CLR version.
12:47:31:489 3296 0388 The CLR v4.0.30319 has been initialized successfully.
12:47:31:489 3296 0388 Creating a new domain setup.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Getting the add-in directory.
12:47:31:489 3296 0388 Success. The directory is 'C:\Users\administrator.FUNDEZ\AppData\Local\FUND E-Z Development Corporation\FEZ14XLFX\'
12:47:31:489 3296 0388 The 'shadow copy' is disabled.
12:47:31:489 3296 0388 Creating a new application domain.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Getting the base directory for the domain.
12:47:31:489 3296 0388 Success. The directory is 'C:\Users\administrator.FUNDEZ\AppData\Local\FUND E-Z Development Corporation\FEZ14XLFX\'.
12:47:31:489 3296 0388 Opening adxloader.dll.manifest.
12:47:31:489 3296 0388 Success. The manifest is 'C:\Users\administrator.FUNDEZ\AppData\Local\FUND E-Z Development Corporation\FEZ14XLFX\adxloader.dll.manifest'.
12:47:31:489 3296 0388 Getting the 'assemblyIdentity' element.
12:47:31:489 3296 0388 Success.
12:47:31:489 3296 0388 Getting the 'name' attribute.
12:47:31:489 3296 0388 Success. The name is 'FUNDEZ14.XLFX, PublicKeyToken=853124717664a2c9'.
12:47:31:489 3296 0388 Getting the 'name' attribute.
12:47:31:489 3296 0388 Success. The class name is 'FUNDEZ14_XLFX.XLLModule'.
12:47:31:489 3296 0388 Attempting to create a new instance of the XLL class.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoOpen' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoClose' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoAdd' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoRemove' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoFree' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'autoFree12' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'addInManagerInfo' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'addInManagerInfo12' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'Dispose' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Getting the dispid of the 'initialize4' method.
12:47:31:551 3296 0388 Success.
12:47:31:551 3296 0388 Invoking the 'initialize4' method.
12:47:31:629 3296 0388 Success.
12:47:31:629 3296 0388 The instance of the managed XLL class has been created successfully.
12:47:31:629 3296 0388 Forwarding xlAutoOpen to the managed code.
12:47:31:708 3296 0388 Success.

Startup directory: C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\
Loader version: 9.3.4641.0
Operating System: Microsoft Windows Server 2016 Standard Edition (build 14393), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files\Microsoft Office\Office14\EXCEL.EXE"
Run 'As Administrator': Yes
Process Elevated: Yes
Integrity Level: High
UAC (User Account Control): On
------------------------------------------------------------------------
12:49:04:757 3512 0388 Starting the add-in registration process.
12:49:04:757 3512 0388 Loading mscoree.dll
12:49:04:757 3512 0388 INFO: Assembly codebase - C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\.dll.
12:49:04:773 3512 0388 INFO: Assembly version - .
12:49:04:773 3512 0388 Getting the latest CLR version.
12:49:04:773 3512 0388 The latest CLR version is 'v4.0.30319'.
12:49:04:773 3512 0388 Loading CLR: v4.0.30319.
12:49:04:773 3512 0388 Calling CLRCreateInstance method.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Calling GetRuntime method.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Checking if the hosting API of .NET Framework v4.0 beta is installed.
12:49:04:773 3512 0388 The hosting API is up to date.
12:49:04:773 3512 0388 Calling SetDefaultStartupFlags method.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Calling GetInterface method for the CorRuntimeHost interface.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Starting CLR...
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Getting the CLR version.
12:49:04:773 3512 0388 The CLR v4.0.30319 has been initialized successfully.
12:49:04:773 3512 0388 Creating a new domain setup.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Getting the add-in directory.
12:49:04:773 3512 0388 Success. The directory is 'C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\'
12:49:04:773 3512 0388 The 'shadow copy' is disabled.
12:49:04:773 3512 0388 Creating a new application domain.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Getting the base directory for the domain.
12:49:04:773 3512 0388 Success. The directory is 'C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\'.
12:49:04:773 3512 0388 Searching for the Add-in Express core library.
12:49:04:773 3512 0388 Success. The 'AddinExpress.MSO.2005.dll' file has been found.
12:49:04:773 3512 0388 Creating an instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:49:04:773 3512 0388 Assembly identity is 'AddinExpress.MSO.2005'.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Unwrapping the instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Creating an instance of the XML parser class.
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Loading the manifest file (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Getting the root element of the manifest (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:49:04:773 3512 0388 Success.
12:49:04:773 3512 0388 Getting the 'assemblyIdentity' element of the manifest (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:49:04:773 3512 0388 Unspecified error
Posted 14 Jun, 2019 14:49:20 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Michael,

An XLL add-in must be deployed and registered per-user, not per machine. That is, you need to install it in the user profiles and the installer should be run with the privileges of the user.

If your assembly also contains a COM add-in, it must be deployed in the very same fashion. You also should be aware that a per-user COM add-in won't load if an an admin user starts the host application elevated. This is by design; see https://techcommunity.microsoft.com/t5/Windows-Blog-Archive/Per-User-COM-Registrations-and-Elevated-Processes-with-UAC-on/ba-p/228531.

I strongly suggest that you check section "Deploying a per-user Office extension via an MSI installer", see the PDF file in the folder {Add-in Express}\Docs on your development PC.

Make sure adxloader.dll.manifest is writable while you do the changes above. Show the manifest if the issue persist.


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2019 08:04:34 Top
Michael Benowitz




Posts: 32
Joined: 2017-02-03
My xll is set to per user and my com xl is set to all users. My xll add in installs correctly the issue is only with my xl add-in

here's the manifest for xl

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<loaderSettings generateLogFile="true" />
</configuration>

here's the manifest for xll

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<assemblyIdentity name="FUNDEZ14.XLFX, PublicKeyToken=853124717664a2c9" xllClass="FUNDEZ14_XLFX.XLLModule" imageRuntimeVersion="v4.0.30319" />
<loaderSettings generateLogFile="true" shadowCopyEnabled="false" privileges="user" />
</configuration>

Thanks,

Mike
Posted 17 Jun, 2019 08:14:24 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Michael Benowitz writes:
My xll is set to per user and my com xl is set to all users.


This is wrong. Because the XLL add-in is per user (it cannot be installed per machine!), you must install the add-in per user as well.

Thank you for the manifest. It looks correct if you install your add-ins per user.


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2019 08:20:54 Top
Michael Benowitz




Posts: 32
Joined: 2017-02-03
Is this a recent chang? In prior versions I installed my xll add-in per user and my xl add in per machine without any issues?

thanks,

Mike
Posted 17 Jun, 2019 08:37:04 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Mike,

I can't tell. This was never supported if the add-ins are located in the same assembly. If these are different assemblies, you need to install them to different folders so that they have different sets of loaders, interops and manifest.


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2019 08:56:41 Top
Michael Benowitz




Posts: 32
Joined: 2017-02-03
They are installed to different folders.

Xl is in program files
XLL is in appdata

I'm testing deployment on a different pc to see if the issue is isolated to my test pc.

Mike
Posted 17 Jun, 2019 09:03:36 Top
Michael Benowitz




Posts: 32
Joined: 2017-02-03
Same results on a different PC.

I have no issues registering the add-in from the development environment.


Mike
Posted 17 Jun, 2019 09:24:14 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Mike,

I assume the manifest of your COM add-in is incorrect: it doesn't specify the assembly to register and the privileges attribute: this one is required for Add-in Express because the COM class of your add-in can be registered for the user of for all users.


Andrei Smolin
Add-in Express Team Leader
Posted 17 Jun, 2019 09:41:27 Top
Michael Benowitz




Posts: 32
Joined: 2017-02-03
I made progress, Now I can manually register my add-in, but the install isn't installing the add-in.

Here's my new manifest

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<assemblyIdentity name="FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee" />
<loaderSettings generateLogFile="true" privileges="admin" />
</configuration>

and the latest log.

Add-in Express Loader Log File: 06/17/2019 12:31:17:050

Startup directory: C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\
Loader version: 9.3.4641.0
Operating System: Microsoft Windows 8 Professional (build 9200), 64-bit
Process Owner: Administrator
Command Line: "C:\Program Files (x86)\Microsoft Office\root\Office16\EXCEL.EXE"
Run 'As Administrator': No
Process Elevated: No
Integrity Level: Medium
UAC (User Account Control): On
------------------------------------------------------------------------
12:31:17:050 4824 1396 Starting the add-in registration process.
12:31:17:050 4824 1396 Loading mscoree.dll
12:31:17:050 4824 1396 INFO: Assembly codebase - C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\FUNDEZ14.XL.dll.
12:31:17:050 4824 1396 INFO: Assembly version - 14.1.1.0.
12:31:17:050 4824 1396 Getting the latest CLR version.
12:31:17:050 4824 1396 The latest CLR version is 'v4.0.30319'.
12:31:17:050 4824 1396 Loading CLR: v4.0.30319.
12:31:17:050 4824 1396 Calling CLRCreateInstance method.
12:31:17:050 4824 1396 Success.
12:31:17:050 4824 1396 Calling GetRuntime method.
12:31:17:050 4824 1396 Success.
12:31:17:050 4824 1396 Checking if the hosting API of .NET Framework v4.0 beta is installed.
12:31:17:081 4824 1396 The hosting API is up to date.
12:31:17:081 4824 1396 Calling SetDefaultStartupFlags method.
12:31:17:081 4824 1396 Success.
12:31:17:081 4824 1396 Calling GetInterface method for the CorRuntimeHost interface.
12:31:17:081 4824 1396 Success.
12:31:17:081 4824 1396 Starting CLR...
12:31:17:081 4824 1396 Success.
12:31:17:081 4824 1396 Getting the CLR version.
12:31:17:081 4824 1396 The CLR v4.0.30319 has been initialized successfully.
12:31:17:081 4824 1396 Creating a new domain setup.
12:31:17:081 4824 1396 Success.
12:31:17:081 4824 1396 Getting the add-in directory.
12:31:17:081 4824 1396 Success. The directory is 'C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\'
12:31:17:081 4824 1396 The 'shadow copy' is disabled.
12:31:17:081 4824 1396 Creating a new application domain.
12:31:17:097 4824 1396 Success.
12:31:17:097 4824 1396 Getting the base directory for the domain.
12:31:17:097 4824 1396 Success. The directory is 'C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\'.
12:31:17:097 4824 1396 Searching for the Add-in Express core library.
12:31:17:097 4824 1396 Success. The 'AddinExpress.MSO.2005.dll' file has been found.
12:31:17:097 4824 1396 Creating an instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:31:17:097 4824 1396 Assembly identity is 'AddinExpress.MSO.2005'.
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Unwrapping the instance of the 'AddinExpress.MSO.ADXLoaderSupport' class.
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Creating an instance of the XML parser class.
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Loading the manifest file (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Getting the root element of the manifest (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Getting the 'assemblyIdentity' element of the manifest (C:\Program Files (x86)\FUND E-Z Development Corporation\FUND E-Z 14 XL\adxloader.dll.manifest).
12:31:17:112 4824 1396 Success.
12:31:17:112 4824 1396 Searching for the 'name' attribute of the 'assemblyIdentity' element.
12:31:17:112 4824 1396 Success. The name is 'FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee'.
12:31:17:112 4824 1396 Calling the managed procedure to register the 'FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee' assembly.
12:31:17 4776 1396 Connecting to the application domain of the Add-in Express loader.
12:31:17 4776 1396 Success.
12:31:17 4776 1396 Loading the 'FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee' assembly.
12:31:17 4776 1396 Success.
12:31:17 4776 1396 Registering the 'FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee' assembly (administrator).
12:31:17 4776 1396 The ' FUNDEZ14.XL, PublicKeyToken=52074e1d8ddc40ee' assembly has been registered successfully.
12:31:17 4776 1396 The managed registration process is complete with HRESULT = 0.
12:31:17:800 4824 1396 The add-in registration process is completed with HRESULT = 0.
Posted 17 Jun, 2019 14:36:55 Top