[wix-users] Is bindingRedirect possible for a managed bootstrapper application?
Gerhard Matzen
gmatzen at osisoft.com
Wed Apr 5 09:10:12 PDT 2017
Thank you, Julius. You are correct. I was able to create an event handler.
Your link and a blog post was helpful:
https://msdn.microsoft.com/en-us/library/ff527268(v=vs.110).aspx
http://blog.slaks.net/2013-12-25/redirecting-assembly-loads-at-runtime/
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Julius Zint
Sent: Wednesday, April 5, 2017 1:25 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Is bindingRedirect possible for a managed bootstrapper application?
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/
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list