Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Custom action calling into .NET 4 assembly

$
0
0
I've confirmed that the sample at

src\WixSharp.Samples\Wix# Samples\DTF (ManagedCA)\Different Scenarios\ExternalAssembly

builds and runs as expected, but the sample doesn't really test building either CustomAction.dll or DisplayMessage.dll for > 3.5 .NET CLR.

And when I add this to my ManagedUI installer after building SetupCustomAction.dll for .NET 4.0:
var project = new ManagedProject("MyProject"
                , new ManagedAction("CustomAction") {
                    ActionAssembly = @"..\SetupCustomAction\bin\Debug\SetupCustomAction.dll",
                    RefAssemblies = newstring[0],
                }
I get the following error in the log:
Info: Calling custom action SetupCustomAction!CustomAction.CustomActions.CustomAction
Info: Error: could not load custom action class CustomAction.CustomActions from assembly: SetupCustomAction
Info: System.BadImageFormatException: Could not load file or assembly 'SetupCustomAction' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
It works fine if I build SetupCustomAction for .NET 3.5

How can I build and specify a CustomAction assembly that allows .NET 4.5+??
d

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>