Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8000049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:40:54+00:00 2026-06-04T15:40:54+00:00

Context I have 2 different versions of an assembly installed in GAC, version 1.0

  • 0

Context

I have 2 different versions of an assembly installed in GAC, version 1.0 and version 2.0. I made an application that is referencing 1.0 as a specific version.

Issue

When I run my application, it will always load version 2.0 whereas the application is specifically referencing version 1.0.

Question

Why is this happening?
How can I force my application to load the version it has been compiled for?

It does not seem to me that this has anything to do with a binding redirect as my application was not even aware of version 2.0 when I built it and that the reference “Specific Version” metadata is set to true.

Thanks.


Edit:

The assembly I am referencing is actually Oracle.DataAccess from the ODAC package. I noticed that other assemblies named Policy.x.xxx.Oracle.DataAccess where published in GAC.


Edit 2:

After looking into the Oracle.DataAccess policy I found the configuration defining the binding redirect:

<configuration>
   <runtime>
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
          <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"/>
            <bindingRedirect oldVersion="4.112.0.0-4.112.3.0" newVersion="4.112.3.0"/>
        </dependentAssembly>
      </assemblyBinding>
   </runtime>
</configuration>

Even though I added the reversed binding redirect into my application configuration, the policy in GAC seems to have the priority.
I found an MSDN article treating the subject and suggesting to ignore policy with this configuration:

<publisherPolicy apply="no" />

But it still does not work…


Edit 3:

I tried to remove the policy from the GAC and rebooted my machine. It finally worked. It does not feel like a confortable solution development but this policy does broke one of my application which means disabling the policy is the right thing to do in my case.


Final Edit:

Igor gave me the right answer. All I had to do to workaround those policies was to use the publisherPolicy setting in the right configruation section:

<runtime>
  <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
      <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"/>
      <publisherPolicy apply="no"/>
    </dependentAssembly>
  </assemblyBinding>
</runtime>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:40:55+00:00Added an answer on June 4, 2026 at 3:40 pm

    After you have edited your question it becomes clear that this is the policy file which affects assembly binding.

    In case of Oracle there’s a file called Policy.X.Y.Oracle.DataAccess.config with the contents similar to this:

    <configuration>
       <runtime>
          <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <dependentAssembly>
              <assemblyIdentity name="Oracle.DataAccess" publicKeyToken="89B483F429C47342"/>
                <bindingRedirect oldVersion="10.1.0.000-10.2.0.100" newVersion="10.2.0.100"/>
            </dependentAssembly>
          </assemblyBinding>
       </runtime>
    </configuration>
    

    The policy is installed by the Oracle Installer and redirects Oracle.DataAccess.dll to the latest version, as Oracle believes the library is backward compatible.

    EDIT: If you don’t want publisher policy to be applied for a particular assembly, put the element in the element:

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="myAssembly" publicKeyToken="..."  culture="en-us" />
            <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
                <publisherPolicy apply="no" />
        </dependentAssembly>
    </assemblyBinding>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I expose my context : I have two Java programs that run on a
I have a winforms application that presently ships with a chm file for context-sensitive
Is it possible to have a method return different values depending on context (how
I have several different content type nodes (videos, image galleries, stories...) that I would
We have a content delivery system that delivers many different content types to devices.
I have 2 data contexts in my application (different databases) and need to be
I'm working on a fresh new product that eventually will have different functionality built
I have a flash project that shall target different platforms. However - code is
I have a web application that use Sring IoC framework. I use the Java
Is it possible to have a page like: www.site.com/page/ and show different templated versions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.