[wix-users] Is bindingRedirect possible for a managed bootstrapper application?
Gerhard Matzen
gmatzen at osisoft.com
Wed Apr 5 09:32:33 PDT 2017
Thank you, John.
I did get to work via the eventhandler method that Julius suggested.
To be a bit more descriptive about what I am doing:
I am dynamically loading in an appdomain:
"osisoft.setup.af.link.dll"
Which loads:
"osisoft.setup.notifications.dll"
Which loads:
"some.dll"
It is some.dll that is compiled against netwonsoft.json version 9.0, but I need 10.0 for other DLLs.
"some.dll" is owned by another team.
Perhaps changing the assembly redirect in the app.config file of some.dll would work, but I was not able to try this.
Adding the bindingRedirect in the app.config file of the other DLLs, did not seem to work.
I'm new to binding redirects, so I'm not sure at what level I would need to configure the redirection.
But I am good for now because I signed up for an event handler following:
https://msdn.microsoft.com/en-us/library/ff527268(v=vs.110).aspx
http://blog.slaks.net/2013-12-25/redirecting-assembly-loads-at-runtime/
thanks again,
Gerhard
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Cooper
Sent: Wednesday, April 5, 2017 6:14 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?
I used redirects without issue. How is a.dll loaded?
--
John Merryweather Cooper
Senior Software Engineer -- Integration Development Group -- Enterprise Notification Service Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Office: 913-341-3434x431050 JoCooper at jackhenry.com
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Gerhard Matzen
Sent: Tuesday, April 4, 2017 8:03 PM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Is bindingRedirect possible for a managed bootstrapper application?
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
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/
NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list