I have two classes.
public class Student{
public List<Course> Courses {get;set;}
}
public class Course{
public Student Student {get;set;}
}
I need to compile them each in separate assembly. CompileAssemblyFromDom argues that it doesnt find another type and it makes sense because these classes are circular dependent. Is there any workaround to do that?
Thanks.
You cannot have them in separate assemblies; you can however abstract out interfaces for the classes and share the interfaces.
In order to reference one assembly from the other when using CompileAssemblyFromDom, you should use the CompilerParameters.ReferencedAssemblies Property