[wix-users] Is bindingRedirect possible for a managed bootstrapper application?

Julius Zint julius.zint at awin-software.de
Wed Apr 5 01:24:53 PDT 2017


This could be of use for you. There is a event fired when the runtime is 
not able to load a specific assembly.
https://msdn.microsoft.com/en-us/library/ff527268(v=vs.110).aspx

You might be able to intercept there and load it yourself.

------ Originalnachricht ------
Von: "Gerhard Matzen" <gmatzen at osisoft.com>
An: "wix-users at lists.wixtoolset.org" <wix-users at lists.wixtoolset.org>
Gesendet: 05.04.2017 03:03:28
Betreff: [wix-users] Is bindingRedirect possible for a managed 
bootstrapper application?

>I have a managed bootstrapper application.  My payload contains 2 dlls.
>
>"a.dll" references Newtonsoft.Json 9.0.
>"b.dll" references Newtonsoft.Json 10.0.
>
>I tried adding...
>
>     <runtime>
>       <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
>         <dependentAssembly>
>           <assemblyIdentity name="Newtonsoft.Json" 
>publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
>           <bindingRedirect oldVersion="0.0.0.0-10.0.0.0" 
>newVersion="10.0.0.0" />
>         </dependentAssembly>
>       </assemblyBinding>
>     </runtime>
>
>...to my BootstrapperCore.confi file.
>
>And I put the 10.0 version of newtonsoft.json.dll in the payload.
>
>But I still get an error similar to:
>
>---------------------------
>PI AF Services 2017
>---------------------------
>Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, 
>Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its 
>dependencies. The system cannot find the file specified.
>---------------------------
>OK
>---------------------------
>
>Since the bootstrapper is native, I don't know if there is a good way 
>to do bindingRedirect.
>
>Does anyone know if adding a binding redirect is possible?
>
>Thanks,
>Gerhard
>
>____________________________________________________________________
>WiX Toolset Users Mailing List provided by FireGiant 
>http://www.firegiant.com/




More information about the wix-users mailing list