简体   繁体   中英

Multiple projects sharing same code without circular reference

I have a C# and F# project. Both are supposed to be a service layer code. But sometimes, code from both project need to access code in the other project.

Can each project reference the other without any problems?

You can't have circular assembly references. This will require refactoring the parts used by both assemblies into a third assembly, which can then be referenced from both.

You need to create 3d project where you must add references from both and then you can use methods and objects from C# and F# projects together.

But usually you don't need such cross-reference. That must be an architecture problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM