When I build the equivalent to this sample in visual Studio using the WixSharp Setup template and a class library template for the CustomAction code, it works as long as the CustomAction library targets .NET 3.5, but fails when switched to .NET 4.0.
Note that the WixSharp Setup template includes a default App.Config file with:
Note that the WixSharp Setup template includes a default App.Config file with:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/></startup>
</configuration>
Deleting the App.Config file doesn't help.