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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:25:01+00:00 2026-05-14T04:25:01+00:00

Consider the following situation: WidgetCompany produced a .NET DLL in 2006 called Widget.dll, version

  • 0

Consider the following situation:

WidgetCompany produced a .NET DLL in 2006 called Widget.dll, version 1.0. I consumed this Widget.dll file throughout my .NET application. Over time, WidgetCompany has been updating Widget.dll, I never bothered to keep up, continuing to ship version 1.0 of Widget.dll with my software. It’s now 2011, my project is now a .Net 3.5 application and WidgetCompany has come out with Widget.dll version 2.0. It looks and functions almost identical to Widget.dll version 1.0, using all the same namespaces and type names from before.

However, Widget.dll version 2.0 has many run-time breaking changes since 1.0 and I cannot simply cut over to the new version; however, I don’t want to continue developing against the 1.0 version and therefore keep digging myself deeper in the hole. What I want to do is do all new development in my project with Widget.dll version 2.0, whilst keeping Widget.dll version 1.0 around until I find time to convert all of my 1.0 consumption to the newer 2.0 code.

Now, for starters, I obviously cannot simply reference both Widget.dll (Ver 1.0) and Widget.dll (Ver 2.0) in Visual Studio. Doing so gives me the following message: “A reference to ‘Widget.dll’ could not be added. A reference to the component ‘Widget’ already exists in the project.” To work around that, I can simply rename version 2.0 Widget.dll to Widget.3.dll. But this is where I’m stuck. Any attempts to reference types found in “the dll” leads to ambiguity and the compiler obviously doesn’t have any clue as to what I really want in this or that case.

Is there something I can do that gives a DLL a new “root” Namespace or something? For example, if I could say “Widget.dll has a new root namespace of Legacy” then I could update existing code to reference the types found in Legacy.<RootNamespace> namespace while all new code could simply reference types from the <RootNamespace> namespace. Pipe dream or reality? Are there other solutions to situations this (besides “don’t get in this situation in the first place”)?

  • 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-14T04:25:02+00:00Added an answer on May 14, 2026 at 4:25 am

    Off the top of my head this is what I’d do.

    Change the name of the Widget for the new version and leave the old one the way it is to keep your legacy code working.

    Then create a project that is a wrapper of the new widget DLL.

    Add this new wrapper project to my existing solution and then reference that wrapper from the existing code and then the compiler should ignore the type clashes because the new widget is in a different project.

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

Sidebar

Related Questions

Consider the following situation: There is a serialization file, created by the older version
Consider the following situation file: ./include/functions/table-config.php containing: . . $tablePages = 'orweb_pages'; . .
Coding Platform: ASP.NET 4.0 C# Consider the following scenario. I am uploading a file
Consider the following situation: I'm using the Application object in ASP.NET to store a
Consider the following situation where I have a list of n matrices (this is
Consider the following situation Code was added to the trunk at revision x A
Consider the following situation: We have two Localizable.string files, one in en.lproj and one
Consider the following situation: I have two android projects named P1 and P2 which
consider following: 1st APPROACH: public void f3() { f2(); f1(); } and this ...
Consider the following situation: I want to replace links in a string, specifically I

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.