1
votes

I am learning the redirection of assembly using publisher policy file. Did the following:

  • I have a DLL called Dependency which is a signed one and had it registered in the GAC.

  • While registering, the assembly version is 1.0.0.1.

  • I developed a test client (Consumer) and referred the same version and built it and ran it once.

  • Changed the AssemblyVersion to 1.0.0.2 for Dependency DLL

  • Created a publisher policy file as shown below

enter image description here

  • Registered the new version in GAC
  • Used Al.EXE like to generate the policy assembly as shown below:

    D:\Test> al /link:policy.config /out:policy.1.0.Dependency.dll /keyfile:....\keyfile.snk /platform:x86

  • I made sure that I am using X86 config only in both the Consumer and Dependency

  • Even after registering the policy assembly, I still see the older version (1.0.0.1) being used by the consumer and the policy config redirection didn't takes place.
  • I tried to use Fusion log viewer but didn't see any failures of redirection

Please help me by guiding me what I am missing. Thank you in advance.

1
For sure is a silly suggestion, but... have you tried to substitute your bindingRedirect section with this one? <bindingRedirect oldVersion="1.0.0.1-1.0.0.2" newVersion="1.0.0.2" />HuorSwords
Hi HuroSwords, It didn't work either :(Prasanna
And what if you delete the <?xml...?> tag line? At all documentation that I found doesn't appear this section in a publisher policy file...HuorSwords
hi! Thank you. I got it worked after changing the culture info to neutral. Thank you for your help!Prasanna

1 Answers

0
votes

I got this solved after I changed the culture info to neutral. I had it as en-US :( Found this when the local app.config redirection was not working either.