log4net

GuyS (45 posts)
January 2, 2018 08:28 AM
Accepted Answer

Maybe not an adTempus question, but have a problem with running my C# program which uses adtempus API's.

Everything run fine in test. In our production environment I get an error (see attachment).

It's a version mismatch. I can understand this, because we are running adtempus 4.2 in production and 4.4 in test.

I'm surprised, because I added log4net in my executable so I would expected that that's the one which is being used, being the one in de folder of my exe file. 

Any idea?

Thanks,

Guy

 

 

Bill Staff (599 posts)
January 2, 2018 08:43 AM
Accepted Answer

Something's wrong with the screen capture you posted so I can't see what the message is. We use log4net version 1.2.11 (same in 4.2 and 4.4), so it shouldn't make a difference what adTempus version you have.

 

GuyS (45 posts)
January 2, 2018 08:53 AM
Accepted Answer

Retry of the Attachment.

Then there will be something wrong with the API I included in application.

Bill Staff (599 posts)
January 2, 2018 01:28 PM
Accepted Answer
What version of the log4net assembly are you deploying with your application? If it's newer than 1.2.11, you need to add an assembly bindingRedirect to your app.config file to map 1.2.11 to whatever version you're using (so the adTempus API will use the newer assembly). If you're using an older version in your application, you need to use 1.2.11 instead (or add the bindingRedirect to map your version to 1.2.11, and deploy with 1.2.11 instead of the older version).
GuyS (45 posts)
January 2, 2018 03:01 PM
Accepted Answer

Ah, the bindingRedirect did the trick.

I will look into that a bit more. Just finished an C# Introduction and maybe I'm trying to much at once :-).

But I really want to use the API's to make life easier for the end-user.

 

Thanks Bill!

Replies are disabled for this topic.