Two assemblies refer to each other

L

lovecreatesbeauty

Say there are two teams.

Team 1 works on the assembly named "MYLIB" project type of class
library in Visual Studio 2008.

team 2 works on the assembly named "myapp" project type of windows
forms.

The team 2 can references classes, data, methods in MYLIB assembly
provided by team 1.

Can team 1 asks team 2 to provide a class in myapp assembly and make
reference in MYLIB to the class?

Thank you for your time
 
A

Alberto Poblacion

Team 1 works on the assembly named "MYLIB" project type of class
library in Visual Studio 2008.

team 2 works on the assembly named "myapp" project type of windows
forms.

The team 2 can references classes, data, methods in MYLIB assembly
provided by team 1.

Can team 1 asks team 2 to provide a class in myapp assembly and make
reference in MYLIB to the class?

Not directly in a Solution in Visual Studio. It does not allow circular
references. A better option would be to extract the needed functionality
from myapp and move it into a third separate assembly; then reference that
assembly from both myapp and mylib.
 
C

Ciaran O''Donnell

You could also provide an Interface in the myLib assembly and a property or
method parameter of that type, potentially even a constructor argument. Then
the class in MyApp and implement the interface and be passed in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top