Custom Action Does Not Load Interop.WUAPILib.dll

Custom Action Does Not Load Interop.WUAPILib.dll

Summary

How to modify your project to load specified assembly

Synopsis

You can create an external .NET assembly and call it from your MSI installation using a custom action. However you may run into a situation where your custom action fails because at installation run time, it is unable to find Interop.WUAPILib.dll. This knowledge base article will show how you can workaround this.

Discussion

Currently the custom action will only load in specific assemblies (...and the Interop.WUAPILib.dll file is not a file we load). So at run time this is why the custom action fails and it's not able to find the Interop.WUApiLib.dll file.

Workaround

To modify your project, just go to the 'Additional Tools->Direct Editor' view and click on the 'ISClrWrap' table.

NOTE: This is assuming your custom action has stored the main assembly .dll in the binary table.

In that table, add a row with the name of your custom action (MyCustomAction), the text (Dependency0) and the build-time path to your dependency DLL (<ISProjectDataFolder>\Files\Interop.WUApiLib.dll) as the three columns like so...

Action_: MyCustomAction
Name: Dependency0
Value: <ISProjectDataFolder>\Files\Interop.WUApiLib.dll

If you need to specify additional assemblies, follow the same process and add another row. However increment the number to 'Dependency1' and so forth, being sure not to skip any numbers.
Was this article helpful? Yes No
No ratings
Version history
Revision #:
1 of 1
Last update:
‎Jul 12, 2018 09:52 PM
Updated by: