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

Consider auto-restore or no restore #1731

Open
richlander opened this issue Aug 22, 2017 · 9 comments
Open

Consider auto-restore or no restore #1731

richlander opened this issue Aug 22, 2017 · 9 comments

Comments

@richlander
Copy link
Member

I frequently open up Code at a spot on disk that has multiple .NET Core projects. I imagine many people do this. When that happens, I see many requests to restore projects. It would be great if that didn't happen, particularly since restore is no longer important with the .NET Core 2.0 SDK.

I imagine that restore is required to provide intellisense. Is it possible to have a setting that auto restores, potentially not until first click into a .cs (or pick your lang) file within a given directory with a .NET Core msbuild file?

The C# plug-in downloads a pile of stuff to my machine for its own purposes automatically already, so it would be great if restore was the same.

@DustinCampbell
Copy link
Member

Auto-restore is fairly a large and tricky endeavor that I would not be able to get to any time soon. That said, you might just consider setting the csharp.suppressDotnetRestoreNotification VS Code setting to true. That way, you don't get any restore messages at all and can control it manually.

@richlander
Copy link
Member Author

I'll do that.

W/o restore, will I still get intellisense for .NET Core types but just not NuGet dependencies?

@DustinCampbell
Copy link
Member

You will get IntelliSense for references that MSBuild is able to resolve. I expect that without an assets file, that would be nothing.

@DustinCampbell
Copy link
Member

Note: This is also related to #141, which might improve your experience quite a bit. That issue is about batching the restore prompts better so that you don't get individual prompts for each project.

@DustinCampbell
Copy link
Member

One final comment: performing a restore is about getting the correct references to the C# compilation in order to provide any IDE functionality at all. It's not just about IntelliSense. An un-restored project will have no navigational features (Go To Definition, Find All References), squiggles will appear everywhere, etc., etc.

@richlander
Copy link
Member Author

performing a restore is about getting the correct references to the C# compilation in order to provide any IDE functionality at all

Makes sense. Yes, my comment about intellisense was way too narrow.

This is also related to #141, which might improve your experience quite a bit.

Yes, that would be a big step forward.

@forki
Copy link

forki commented Dec 12, 2017

Dotnet restore in the background is a very important feature. Given that VS2017 and Ionide support it, I think OmniSharp should do it in vscode as well.

@Deilan
Copy link

Deilan commented Jul 21, 2018

Yep, that's a crucial one. :)

@kaptcha0
Copy link

kaptcha0 commented Jul 1, 2021

Will this be implemented?

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

6 participants