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

Run single Test in VSCode is slower with .Net CLI 2.0 because of restore #942

Closed
tverboon opened this issue Aug 18, 2017 · 3 comments
Closed

Comments

@tverboon
Copy link

dotnet cli 2.0 automatically restores before building when executing dotnet build or dotnet test. I can understand why, but still I have been adding --no-restore to all our build scripts and VSCode tasks.

Going through the code Omnisharp-Roslyn code, I noticed that the CLI is also called with build:

var process = DotNetCli.Start("build", WorkingDirectory);

Calling with --no-restore is possible here, but not sure what you think is best from a functionality standpoint? In my opinion, during development, these tasks should be as fast as possible.

@DustinCampbell
Copy link
Contributor

Thanks @tverboon. You're right, that's probably the right thing to do here. However, the "restore" on build is supposed to be very quick (milliseconds).

@tverboon
Copy link
Author

Yes, in our case it's typically between 30 and 50 milliseconds per project. We have around 10 projects in the dependency graph, in that case it takes between 300 and 500 ms.

It's not possible to just add --no-restore in this line, because there needs to be a check for the dotnet version. Not sure if it's cached somewhere, otherwise starting the dotnet process to get the version, makes it potentially even slower for projects with less project dependencies.

@DustinCampbell
Copy link
Contributor

Yup, I was already thinking about needing a version check. We do check the version earlier, so we should be able to pass that along.

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

No branches or pull requests

2 participants