Skip to content

Disable NuGet package restore in Visual Studio for Roslyn.sln#24411

Merged
sharwell merged 1 commit intodotnet:dev15.6.xfrom
sharwell:disable-nuget-vs
Jan 24, 2018
Merged

Disable NuGet package restore in Visual Studio for Roslyn.sln#24411
sharwell merged 1 commit intodotnet:dev15.6.xfrom
sharwell:disable-nuget-vs

Conversation

@sharwell
Copy link
Copy Markdown
Contributor

@sharwell sharwell commented Jan 24, 2018

Infrastructure only change.

This change results in a 50+% reduction in the amount of data allocated during solution load.

Time to fully load Roslyn.sln after running Restore.cmd (i.e. NuGet restore is a NOP):

  • Without this change: 1:37-1:51
  • With this change: 1:29

@tmat
Copy link
Copy Markdown
Member

tmat commented Jan 24, 2018

Do we have an issue tracking the root of the problem?

@tmat
Copy link
Copy Markdown
Member

tmat commented Jan 24, 2018

Seems like it should be possible to check whether all projects in a solution have been previously restored very quickly.

@emgarten
Copy link
Copy Markdown
Member

Time to fully load Roslyn.sln after running Restore.cmd (i.e. NuGet restore is a NOP):

This is likely being treated as a full restore and not a noop by NuGet due to:
NuGet/Home#4627

You can check by letting VS run the restore fully, then closing and re-opening the solution. That should definitely be a noop.

It looks like NuGet/Home#4627 is going into 15.6, but the fix hasn't been inserted yet.

@tmat
Copy link
Copy Markdown
Member

tmat commented Jan 24, 2018

If it's indeed gonna be available in 15.6 then I'd rather not merge this PR.

@jaredpar
Copy link
Copy Markdown
Member

If it's indeed gonna be available in 15.6 then I'd rather not merge this PR.

I'd rather merge this PR and then undo once we confirm the bug is fixed. VS is unusable with NuGet at this point.

@sharwell
Copy link
Copy Markdown
Contributor Author

@tmat I believe you may be looking at the impact of this change in the wrong way.

Currently users are disabling NuGet for the entire VS installation through Tools → Options in order to work on Roslyn. This configuration change limits the disabling to only occur for solutions in this repository. The net impact of this change is users will be able to enable NuGet for more IDE scenarios, improving overall usage.

@sharwell sharwell merged commit e100ab3 into dotnet:dev15.6.x Jan 24, 2018
@sharwell sharwell deleted the disable-nuget-vs branch January 24, 2018 17:56
@sharwell sharwell added the Contributor Pain The issue impedes progress for project collaborators. label Jan 24, 2018
@tmat
Copy link
Copy Markdown
Member

tmat commented Jan 24, 2018

OK. Fair enough. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contributor Pain The issue impedes progress for project collaborators.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants