We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

WesCutting
Posts: 14
Joined: Wed Jul 23, 2014 5:07 pm

Custom Actions & CLR Binding Issue

I currently have a Custom Action DLL that compiles with .Net 4 as the target Framework. The Advanced Installer project has a prerequisite for the .Net Framework 4.
The verbose logs states:

SFXCA: Extracting custom action to temporary directory: C:\Users\netmed\AppData\Local\Temp\MSI9C06.tmp-\
SFXCA: Binding to CLR version v2.0.50727
Calling custom action ActionName
Error: could not load custom action class ClassName from assmebly: AssemblyName
System.BadImageFormatException: Could not load file or assembly AssemblyName or one of its dependencies. This asembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

I'm a little confused where it intuits the CLR binding to v2.0.50727 instead of using the runtime the DLL compiles with. Is there anything I can do in Advanced Installer to fix this issue or is it a Visual Studio Solution problem that I need to sort out?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Custom Actions & CLR Binding Issue

Hi,

The problem is with the VS solution, the following threads explain different solutions:

http://stackoverflow.com/questions/3298 ... to-resolve

http://stackoverflow.com/questions/4548 ... -currently

http://windows-installer-xml-wix-toolse ... 42116.html

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”