bindingpolicy for a private assembly referencing another private assembly

J

jbp123gg

Hi,

Our app uses a private assembly "NUnitAsp.dll" which itself uses a
private assembly "nunit.framework.dll", version 2.1.4.0. Now our app
uses "nunit.framework.dll" version 2.3.0.0. So we have a mismatch here.
Version 2.3.0.0 has a strong name so I can add it to the GAC and
reference it just fine.

Is there a way to configre NUnitAsp.dll, a seperate private assembly,
to use "nunit.framework.dll" version 2.3.0.0 instead of 2.1.4.0? I
tried using :

<runtime>
<assemblyBinding xmlns="urn:schems-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework.dll"/>
<bindingRedirect oldVersion="2.1.4.0" newVersion="2.3.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>


In our applications web.config, but that isn't working. I am guessing
this could be because when the binding policy is added to an
application, it applies only the application's own dll and not the dlls
that the application references? Not sure why this is not working.

Unfortunately NUnitAsp.dll is not a signed assembly, so I cannot added
it to the GAC and then configure it seperately.

Thanks,

Jon Paugh
 
M

Mattias Sjögren

<assemblyIdentity name="nunit.framework.dll"/>

The assembly name doesn't include any file extension, so try with

<assemblyIdentity name="nunit.framework"/>

If the assembly has a strong name you should include the
publicKeyToken as well.

In our applications web.config, but that isn't working. I am guessing
this could be because when the binding policy is added to an
application, it applies only the application's own dll and not the dlls
that the application references?

No, runtime config settings apply to the whole application.




Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top