I have an architecture like:
Data (a class library that processes our Entity Framework stuff)
Components (mid-level class library that references a data library)
WebOffice (a web application that references a component library but not a data library)
Now I have the following code snippet (it lives inside our Components.Payment.cs; tblPayment is contained in our data library.):
public static Payment Retrieve(int id) { var t = repository.Retrieve(id); //the above line returns a tblPayment object if (t != null) return new Payment(t); return null; } public static Payment Retrieve(tblPayment tblPayment) { return new Payment(tblPayment); }
After that I added; WebOffice project gives the following error:
errorCS0012: The type "Data.Model.tblPayment" is defined in an assembly that is not referenced. You must add a reference to the assembly 'Data, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = 749b8697f3214861'.
Now this makes no sense to me, because the WebOffice project doesn't call the Retrieve (tblPayment tblPayment) method at all. (This is used only in the Components library)
Any clue why it will request a link to the data? Do I need to reference each library that the library link refers to? (try saying 5 times fast ...)
Jim b
source share