Note that there are some explanatory texts on larger screens.

plurals
  1. POLingering assembly dependency in C# .NET
    primarykey
    data
    text
    <p>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.</p> <p>This project used to throw and catch a custom exception class - the <code>SuperException</code> - which was derived from the standard System.Exception and lived in a separate, precompiled assembly, <code>SuperAssembly.DLL</code>, which I referenced.</p> <p>Eventually, I decided this was a pointless exercise and replaced all <code>SuperExceptions</code> with a System.SuitableStandardException in each case. I removed the reference to <code>SuperException.DLL</code>, but am now met with the following on trying to compile the project:</p> <blockquote> <p>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 (...)'</p> </blockquote> <p>The source file referenced by the error doesn't seem relevant; it's the project namespace that gets highlighted in the IDE.</p> <p>Now, here's the thing:</p> <ol> <li>All uses of <code>SuperException</code> have been eliminated from the project's code.</li> <li>Compared to another project that compiles fine without a reference to <code>SuperException.DLL</code>, I only reference one more assembly - and <code>that</code> references nothing that my project doesn't reference itself. While it's possible that any of these dependencies could throw <code>SuperExceptions</code>, I'm only catching the base Exception class and in any case... the other project builds fine!</li> <li>I've done Visual Studio's "Clean Solution" and cleared everything out by hand, many times.</li> </ol> <p>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!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload