-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Our mono-repo now contains 95+ .NET projects! 🥳
All is great, however when our CI build runs npm install to install nx and its dependencies, it also fires off the nx g @nx-dotnet/core:restore command that was added to the package.json prepare script.
This results in a huge time loss - the implicit nuget restore takes approximately 9 minutes on our build agent to restore all the packages for the 95 projects...and then after doing all that, nx may decide to build only one affected project (or sometimes none at all for simple changes).
Is there any specific reason why the nuget restore has to happen at the point of npm install? Can this not be handled either explictly via the nx-dotnet generator (e.g. nx generate @nx-dotnet/core:restore) in a separate build step (if required) or left to the implicit restore performed by the dotnet build command that is invoked by the nx-dotnet build target? (see https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-build#implicit-restore).