0

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?

Brad Robinson
  • 44,114
  • 19
  • 59
  • 88

1 Answers1

0

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.
Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103
  • Thanks Victor. I've since discovered I can just create a package.json in each project and so long as I include a dependency section on the other assembly the build tool seems to sort it out. ie: in one project.json in the dependencies section I just include `"MyOtherAssembly": "*"` – Brad Robinson Apr 19 '16 at 22:44