Skip to content
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

Don't restore in the IDE if everything is already restored #5239

Closed
davidfowl opened this issue May 17, 2017 · 4 comments
Closed

Don't restore in the IDE if everything is already restored #5239

davidfowl opened this issue May 17, 2017 · 4 comments
Labels
Area:RestoreNoOp The PackageReference no-op

Comments

@davidfowl
Copy link
Member

After running a very long build.cmd that fully restores, builds and run tests before opening visual studio, after opening a solution file the IDE proceeds to run restore again which can take a long time for a big project.

Not only that but if I close and reopen the solution after all of that, it proceeds to restore again. It seems like we blindly restore on open.

@emgarten
Copy link
Member

@nkolev92 is fixing this for 15.3.

Restore will hash all inputs and persist it to the obj folder, both VS and the command line will use this.
#5183

@nkolev92
Copy link
Member

The no-op restore work went in starting with d15prerel-26609.0.
It was also inserted into the CLI/SDK on the 8th as well. CLI builds from 9th June and later have this change.

@davidfowl
Copy link
Member Author

I just installed 15.3 preview 3 and it still does a restore on project open:

Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project SampleApp could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project Microsoft.AspNetCore.Http.Tests could not be loaded.
Error occurred while restoring NuGet packages: The operation failed as details for project Microsoft.AspNetCore.Authentication.Core could not be loaded.
Restoring NuGet packages...
Time Elapsed: 00:00:00.8443961
========== Finished ==========

@nkolev92
Copy link
Member

nkolev92 commented Jun 27, 2017

@davidfowl There are still some inconsistencies among the restore behavior between the commandline clients and VS for some project types.
Tracked here:
#5444
&
#5452

Which project type do you have?
Which client does the build.cmd restore call? What version are the exact versions of both the command line client and VS?

The SDK based Package Reference inconsistency is fixed, but there some caveats based on which commandline tool you're using.

@nkolev92 nkolev92 added the Area:RestoreNoOp The PackageReference no-op label Jul 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:RestoreNoOp The PackageReference no-op
Projects
None yet
Development

No branches or pull requests

3 participants