0

I have a pair of class libraries which were generated when I decompiled them using JustDecompile. Once included in my VS 2017 solution, I added one as a reference in the other. I then find that I have this error in VS:

The type 'XYZ' is defined in an assembly which is not referenced. You must add a referenced to assembly 'X.Y.Z.XYZ, Version 1.0.0.0, Culture.....'

Given I am including the code as actual class libraries in my solution, all with the same target framework version (4.6.1) why is it showing an error which I would normally expect to see with an added DLL?

Matt W
  • 11,753
  • 25
  • 118
  • 215
  • If **A** refers to _types_ in **B** and **C**, then **A** must _reference_ **B** and **C** (irrespective if **B** already has a reference to **C**) –  Apr 29 '21 at 09:26
  • By the way it's possibly easier for everyone if we were not talking about obfuscated types `XYZ` and filenames **X.Y.Z**. A, B, C. ;) –  Apr 29 '21 at 09:30
  • Does this answer your question? [The type is defined in an assembly that is not referenced, how to find the cause?](https://stackoverflow.com/questions/20660999/the-type-is-defined-in-an-assembly-that-is-not-referenced-how-to-find-the-cause). There's a few things there. Ignore the one about same .NET Framework versions as I see you are already across it with 4.6.1 –  Apr 29 '21 at 09:33

0 Answers0