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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:23:48+00:00 2026-06-15T13:23:48+00:00

Possible Duplicate: When must we use extern alias keyword in C#? I have an

  • 0

Possible Duplicate:
When must we use extern alias keyword in C#?

I have an assembly which is composed mostly of files shared from other projects in the solution. In other words, the whole solution would be about 10 MB, but I export a small subset of that functionality into a separate 200 KB assembly. All the projects in the solution are in the NUnit test project except the UI.

The problem is, I went to add a test for one of the shared files, and I got the following error:

The type 'xxx' exists in both 'c:\path\to\project\Logic.dll'
and 'c:\path\to\project\Exported.dll'.

I know I can use reflection and provide an assembly qualified name, or I could remove the exported assembly tests into a separate project, but both would be a pain. I simply want to specify to use the version of xxx in the Logic.dll at compile time. Is it possible to specify which version of the Type to use at compile time, so it looks like this:

xxx blah = new xxx();
blah.DoSomething(123);

instead of:

Type t = Type.GetType("Logic.xxx, Logic");
object blah = Activator.CreateInstance(t);
t.GetMethod("DoSomething").Invoke(blah, new object[] { 123 });
  • 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-15T13:23:49+00:00Added an answer on June 15, 2026 at 1:23 pm

    Hans Passant’s comment is the correct answer: “extern alias” is what I was looking for, and the answers in When must we use extern alias keyword in C#? give good pointers to how to use it.

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

Sidebar

Related Questions

Possible Duplicate: Checking if .NET is installed from the command line I have a
Possible Duplicate: Find files not added to subversion We use SVN with Tortoise for
Possible Duplicate: Incorrect syntax near the keyword 'with'…previous statement must be terminated with a
Possible Duplicate: Prevent Back button from showing POST confirmation alert I have used the
Possible Duplicate: Which kind of pointer do I use when? I read that std::auto_ptr
Possible Duplicate: C++: When to use References vs. Pointers Could operator overloading have worked
Possible Duplicate: Does the compiler continue evaluating an expression where all must be true
Possible Duplicate: Why do I get error: … must be a reference type in
Possible Duplicate: Call web service from jQuery I want to add two numbers together,
Possible Duplicate: What requirements must std::map key classes meet to be valid keys? 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.