exceladdin-express

Excel Plugin no longer works after adding nlog (installed with addin-express)


I recently implemented some logging with NLog which I installed through NuGet. This works fine on my local machine during debugging.

Now when I (or anyone else) attempts to install our add-in, the add-in is not present in Excel. There is no error messages, no log file evidence, but the add-in is present in the Control Panel.

The add-in also does not appear in the File > Options > AddIns > COM panel of excel.

Edit: Found a log file in %TEMP%.

Exception Source:      MyPlugin
Exception Type:        System.IO.FileLoadException
Exception Message:     Could not load file or assembly 'NLog, Version=4.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Exception Target Site: .cctor

So how do I tell addin-express to use the nlog file from nuget?


Solution

  • Turned out that the Addin-Express install was faulty. We had to uninstall and reistall it then the dependencies were properly bundled with the plugin install.