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 4616450
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:58:59+00:00 2026-05-22T01:58:59+00:00

A bit of background: I have a library project A, which contains a lot

  • 0

A bit of background:

I have a library project A, which contains a lot of data and some managed DLLs. This project has its own installer (due to its size) and can be installed independently.

Then I have some other projects which can provide extra features when they detect that project A is also installed.

Setup:
I created an Interface.dll which contains intefaces that are implemented by project A. All other projects include this DLL so I can load project A at runtime and cast it to specific interface.

The problem occurs with versioning. Sometimes some projects will include newer version of Interface.dll while installed project A has dependency on an older one. When this happens my cast no longer works.

I am considering some possibilities:

  1. Ditch interface.dll and load everything dynamically.
  2. Some version detection and inform user to update his version of project A.
  3. Use some other means of communication (e.g. command line)
  • 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-05-22T01:58:59+00:00Added an answer on May 22, 2026 at 1:58 am

    Presumably the interfaces defined in interfaces.dll and implemented by project A haven’t changed? Maybe the other projects have just added new interfaces.

    You might have a plain old .NET DLL versioning issue here. Project A (A.exe?) is compiled against interfaces.dll version 1.0.0.0, and this information is stored in A.exe’s metadata. When you update interfaces.dll to 1.0.0.1, A.exe can’t load it. If the new DLL is backwards compatible (which it really must be for your casts to work) then you can supply a policy file that tells the runtime loader about this compatibility. For example:

    <?xml version ="1.0"?>
    <configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
            <assemblyIdentity name="interfaces" culture="neutral" publicKeyToken="null"/>
            <bindingRedirect oldVersion="1.0.0.0-1.0.0.1" newVersion="1.0.0.1"/>
        </dependentAssembly>
        </assemblyBinding>
    </runtime>
    </configuration>
    

    This tells the loader that if an assembly tries to load any version of interfaces.dll between 1.0.0.0 and 1.0.0.1, then version 1.0.0.1 is acceptable. Name this file after your DLL, using a standard pattern: policy.1.0.interfaces.xml. Then put it in the same directory as your A.exe (I think.)

    Alternatively, if you haven’t changed the version number of interfaces.dll (which you really should) then you might have a different problem. If you’ve got two assemblies whose identities are the same but they’re not actually the same assemblies, then once the runtime loader has loaded one of them it will never load the second. There are more details, but since I reckon this is unlikely to be your problem I won’t go into them right now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project which uses C++/CLI to implement a GUI and some background
First a bit of background: I have a web server which runs 4 instances
First - a little bit about my background: I have been programming for some
I have to run a bit of code in the background every one second,
This feature worked a bit, then stopped working. Background: Given a user is logged
Some Background I have been using Git for a while now. The projects that
I have some scientific image data that's coming out of a detector device in
First a little bit of background: I have a REST service in WCF 4
A bit of background: I'm building an MVC app to store golf course data
I have begun work on a personal project that may end up having some

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.