Building multiple assembly project with CoreCLR and dnu

72 Views Asked by At

What's the best practice for building a CoreCLR/DNX project comprised of multiple assemblies?

Would there be a project.json for each assembly and would each need to be manually built using a custom script or can the existing build tools walk these dependencies and build everything itself?

Are there any examples of projects like this?

1

There are 1 best solutions below

1
Victor Hurdugaci On

Usually, each assembly == a NuGet package == a project.json.

A good example of a solution with multiple assemblies is Mvc.

The ASP.NET team uses KoreBuild, an internal (but public) too to orchestrate the build. The idea is that it calls dotnet/dnu build/pack/publish on the projects. KoreBuild looks for projects under src, test, and samples.

Both with dnu and dotnet it's easy to build an entire project graph:

  • dnu supports globbing patterns so you can do somethig like dnu build src/** and it will figure out the graph in that folder.
  • dotnet already knows what was compiled before so you don't need to care. Just call dotnet build on each project and it will rebuild it's dependencies if necessary.