NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Binding redirect issue -> Could not load file or assembly

Hello,

 

I have WPF application targetting .net48 with following references:

A -> APP

A -> B -> APP

Both A & B references some other 3rd party lib (Microsoft.Extensions.Logging.Abstractions installed as nuget, let's nickname it L) .
Case is that B was referencing newer L than A. In result final APP build contains newer version of L.

When APP is launched as application everything works fine.

 

Issue is, that same *.dlls are used in TestStand in API. Unfortunatelly TS is throws following exception:

MichalGranat_1-1731064676827.png

As B references L in version 8.0.2, there is this one in final build, I suppose. When A is tryining to use it, there is this exception.

 

Now, it's clear what's the issue, but I cannot find any reasonable solution. 
 -> Editing SeqEdit.exe.config is not acceptable for me
 -> Editing app.config seems to be without effect

Could someone provide any help, please?
Thanks and regards,
Michal

 

=======================

MichalGranat_0-1731064249195.png

 

0 Kudos
Message 1 of 5
(209 Views)

@MichalGranat wrote:

Hello,

 

I have WPF application targetting .net48 with following references:

A -> APP

A -> B -> APP

Both A & B references some other 3rd party lib (Microsoft.Extensions.Logging.Abstractions installed as nuget, let's nickname it L) .
Case is that B was referencing newer L than A. In result final APP build contains newer version of L.

When APP is launched as application everything works fine.

 

Issue is, that same *.dlls are used in TestStand in API. Unfortunatelly TS is throws following exception:

MichalGranat_1-1731064676827.png

As B references L in version 8.0.2, there is this one in final build, I suppose. When A is tryining to use it, there is this exception.

 

Now, it's clear what's the issue, but I cannot find any reasonable solution. 
 -> Editing SeqEdit.exe.config is not acceptable for me
 -> Editing app.config seems to be without effect

Could someone provide any help, please?
Thanks and regards,
Michal

 

=======================

MichalGranat_0-1731064249195.png

 


The issue arises from version conflicts in referenced libraries. Ensure both A and B reference the same L version. Consider separate build configurations, assembly binding redirection, or isolated AppDomains.

0 Kudos
Message 2 of 5
(143 Views)

I've tried to setup assembly binding redirection, but without success. Where should I do this?

Question is why APP has no problem with this? Why TestStand is not able to handle it in the same way? 


0 Kudos
Message 3 of 5
(119 Views)

In net framework You can crate wrapper that registers to this event as fisrt step that sequence calls:

AppDomain.CurrentDomain.AssemblyResolve += CurrentDomainOnAssemblyResolve;

 

It will display what is missing, You can point to the right dll 

Message 4 of 5
(101 Views)

I'd really like to know how can I set binding redirection in TestStand. All redirections set in VS project (App.config) seems not to work. 

I've found something about editing SeqEdit.exe.config, but this seems as a bad idea to me. 

0 Kudos
Message 5 of 5
(55 Views)