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

  • Home
  • SEARCH
  • 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 139309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:24:42+00:00 2026-05-11T07:24:42+00:00

My C# project – we’ll call it the SuperUI – used to make use

  • 0

My C# project – we’ll call it the SuperUI – used to make use of a class from an external assembly. Now it doesn’t, but the compiler won’t let me build the project without the assembly reference in place. Let me elaborate.

This project used to throw and catch a custom exception class – the SuperException – which was derived from the standard System.Exception and lived in a separate, precompiled assembly, SuperAssembly.DLL, which I referenced.

Eventually, I decided this was a pointless exercise and replaced all SuperExceptions with a System.SuitableStandardException in each case. I removed the reference to SuperException.DLL, but am now met with the following on trying to compile the project:

The type ‘SuperException’ is defined in an assembly that is not referenced. You must add a reference to assembly ‘SuperException, Version=1.1.0.0 (…)’

The source file referenced by the error doesn’t seem relevant; it’s the project namespace that gets highlighted in the IDE.

Now, here’s the thing:

  1. All uses of SuperException have been eliminated from the project’s code.
  2. Compared to another project that compiles fine without a reference to SuperException.DLL, I only reference one more assembly – and that references nothing that my project doesn’t reference itself. While it’s possible that any of these dependencies could throw SuperExceptions, I’m only catching the base Exception class and in any case… the other project builds fine!
  3. I’ve done Visual Studio’s ‘Clean Solution’ and cleared everything out by hand, many times.

It’s not the end of the world to include this reference, I just don’t see why it’s necessary any more. Nrrrgg. Any pointers welcome!

  • 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. 2026-05-11T07:24:43+00:00Added an answer on May 11, 2026 at 7:24 am

    It’s likely a transitive reference, where some type method call returns an instance of SuperException boxed (‘downcast’) as e.g. Exception, but from inspecting the code in the transitively included code, i.e. code from your external method calls, the compiler knows that you need to be able to have information about that type at some point.

    Resharper would tell you where it’s the case that you need to add a reference, and you could use Lütz Roeder’s aka RedGate’s Reflector to scan compiled IL for a reference to this type in two ways: 1) use the search-facility, 2) open each public type you’re using and for that one which requires the ‘ghost’ assembly, it will ask you to specify its location.

    This most often happends to me when I reference Castle.Windsor but not Castle.MicroKernel. :p

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

Sidebar

Related Questions

This project was coped almost exacatly from the example on the admob page but
Project#1 has some interfaces and classes that project#2 references. Now I want to use
Project I've developed a remoting class which is used to replace a subset of
My project have no visible error but when i try to run it gives
Project CompetitionServer.exe raised exception class ESQLiteException with message 'Error executing SQL. Error [1]: SQL
Project Structure I have a silverlight project SLProj, that references a silverlight class library
The project i am working at right now requires some declarative way of defining
My project demands and upgrade from groovy 1.7.2 to 1.8.x stable release, there are
.project files contain references to the project natures used in the project. These project
PROJECT A contains a View , let's call it View1.ascx marked as Embedded Resource

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.