-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Make nuget restore optional in package.json prepare script #101
Comments
Yeah, on a fresh clone this would take a bit of time... I'll push out a patch for this, so that the init script only adds it once instead of on readding it if its been deleted. |
🎉 This issue has been resolved in version 1.4.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Nice work dude! 🥇 |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
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 thenx g @nx-dotnet/core:restore
command that was added to the package.jsonprepare
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 thedotnet 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).The text was updated successfully, but these errors were encountered: