RoslynAssembly icon indicating copy to clipboard operation
RoslynAssembly copied to clipboard

This sample does not explain one case...

Open IfZen opened this issue 3 years ago • 1 comments

I figured out that to build an assembly with mutliple classes I had to reference netmodule from main module In your article it seems pretty obvious because in class program you use other classes. But if you don't use them, the main module still need to reference other. which is counter intuitive. and we got a wrong error message on LoadModule call saying "specified file is not valid" Anyway, your sample does not explain one particular case and I can't find any relevant keyword to search this case:

how to compile two pieces of code that reference each other ? Example:

Class Node { Edge edge; }

Class Edge { Node node; }

It seems impossible because we can't have both MetadataReference before compiling them...

IfZen avatar Feb 18 '22 00:02 IfZen

Hey lfZen - it was very long ago, so I do not remember anything now. But netmodules are not allowed in .NET core and .NET 5 and 6, so I assume that we should avoid them. Thanks

npolyak avatar Feb 18 '22 01:02 npolyak