I have a solution with some projects. One of this projects is the one I\'ve defined as main, also his class has a main Method.
Inside this class, I\'ve defined some
Based on your comments to other answers it sounds like your problem is really that you have a circular dependency which you need to break. Generally the way to do that is to factor out an interface and place it in a third project that both other projects can reference so instead of
class Foo //foo lives in project 1 (depends on project 2)
{
public Bar GetNewBar()
{
return new Bar(this);
}
public void DoSomething(){}
}
public class Bar //bar lives in project 2 (depends on project 1 -- cant do this)
{
public Bar(Foo parent){}
}
you have
class Foo: IFoo //foo lives in project 1 (depends on project 2 and 3)
{
public Bar GetNewBar()
{
return new Bar(this);
}
public void DoSomething(){}
}
public class Bar //bar lives in project 2 (depends on project 3)
{
public Bar(IFoo parent){}
}
public interface IFoo //IFoo lives in project 3 (depends on nothing)
{
void DoSomething();
}