Assuming this folder structure
SampleApp global.json Src Web project.json Startup.cs ... Model project.json Startup.cs ...
how does one compile both projects using dotnet
? (from command line, not in visual studio)
If you run dotnet build
at the root folder level you get
Could not find file .. project.json
I can see there is this outstanding enhancement on the CLI repo but that is from Feb2.
Any script would have to take dependencies into account before just blindly calling dotnet
on all src
sub-folders.
The dotnet build
command accepts glob patterns. So you can do this:
dotnet build Src/**/project.json
There's no such a tool yet. Even KoreBuild, the tool that the ASP.NET team uses, goes blindly in each folder and invokes dotnet build/pack
.
The nice thing is that dotnet build
is now smart enough to not recompile the dependencies if they haven't changed, so that's not a problem anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With