Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

[NuGet] Support no-op restores on opening a solution#4778

Merged
mrward merged 1 commit intomasterfrom
nuget-no-op-restore
May 12, 2018
Merged

[NuGet] Support no-op restores on opening a solution#4778
mrward merged 1 commit intomasterfrom
nuget-no-op-restore

Conversation

@mrward
Copy link
Contributor

@mrward mrward commented May 11, 2018

On opening a solution containing projects that use PackageReferences
the restore that runs was forcing a restore for each project. This
resulted in the project.assets.json file being re-generated and
the projects being re-evaluated. Now if the package references have
not changed a no-op restore will occur. This makes the restore much
faster on opening a solution. It also prevents NuGet going online to
fetch NuGet package information if a wildcard is used for a
PackageReference or if the version cannot be found. In the Package
Console when a no-op restore occurs you will see the following
messages:

Assets file has not changed. Skipping assets file writing.
No-Op restore. The cache will not be updated.

Fixes VSTS #614192 - NuGet Restore is never a no-op

On opening a solution containing projects that use PackageReferences
the restore that runs was forcing a restore for each project. This
resulted in the project.assets.json file being re-generated and
the projects being re-evaluated. Now if the package references have
not changed a no-op restore will occur. This makes the restore much
faster on opening a solution. It also prevents NuGet going online to
fetch NuGet package information if a wildcard is used for a
PackageReference or if the version cannot be found. In the Package
Console when a no-op restore occurs you will see the following
messages:

    Assets file has not changed. Skipping assets file writing.
    No-Op restore. The cache will not be updated.

Fixes VSTS #614192 - NuGet Restore is never a no-op
@mrward mrward merged commit 5988904 into master May 12, 2018
@mrward mrward deleted the nuget-no-op-restore branch May 12, 2018 13:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants