Custom Action Does Not Load Interop.WUAPILib.dll
SummaryHow to modify your project to load specified assembly
SynopsisYou 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.
DiscussionCurrently 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.
WorkaroundTo 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...
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.