-
Notifications
You must be signed in to change notification settings - Fork 679
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
No IntelliSense in C# file that is not included in a project #47
Comments
This is something we'll definitely be working on. Today, you can't get IntelliSense for a file without it belonging to a project file, which is not a great experience. |
And I can't create a project too, because there is no "New Project" option on the menu, which is also not a great experience either. |
@Leocrespo -- bear in mind that this is an editor and not an IDE. "New Project" isn't something that you find in many other editors (like, say Sublime Text). |
So there's no Intellisense because the file doesn't belong to a project, and yet I can't create a project. Sure, makes sense. |
As I said, we'll be working on IntelliSense for project-less scenarios. At the moment, the most common way to create a C# project for VS Code scenarios is to use a scaffolding tool like yeoman or to create a project.json manually. Eventually, you'll be able to use the .NET command-line tools to create a project with "dotnet new". |
@DustinCampbell 'Dotnet new' creates simple Console app template. vscode can't create a project. Yeoman is probably outdated, it doesn't work with latest CLI. Is there any way of creating web api or class library? |
Sorry if this is obvious, but the problem is that there is a major shift in how ASP.NET Core works, and it hasn't been fully released. I think your best bet is https://github.com/aspnet/cli-samples. If you have trouble, you may want to follow up with @sayedihashimi, and I believe he owns the yoman generator. |
|
this looks like the same as this OmniSharp/omnisharp-roslyn#207 I would like to mention that you can get project-less intellisense in CSX files already in omnisharp |
This is an old issue but what needs to be done to accomplish this? At my job I review and trace code more than I write it. Usually I'll clone multiple repos and go through code, tracing things by hovering over a symbol and going to definition. For example, I cloned https://github.com/aspnet/mvc. In Sublime with no additional setup I can just hover over a symbol and see where it's defined: In VS Code the story is different: What would need to be done in order to match Sublime's out-of-box experience with projects like this? |
@landaire: This issue is different than what you've reported here. This issue is about opening just a single file with no project file. However, in your scenario (cloning MVC), you certainly have a project file. |
@DustinCampbell: Hmmm. True. I was under the impression I was using a different C# plugin that was not backed by Omnisharp (and didn't look at project files) but sure enough that's the plugin I'm using. Is there a separate issue already that you're aware of for what I'm referring to? |
Without more information, it's hard to determine what's going on and whether there's an existing issue that matches what you're seeing. Have you tried clicking the OmniSharp icon at the bottom right of the status bar and picking a particular solution or project to launch OmniSharp on? Also, what does the OmniSharp Log display? (You can see this by selecting View->Output and then picking "OmniSharp Log" from the dropdown in the top-right of the Output pane). |
Will a good use when you want to create small script to be use with dotnet script (https://github.com/filipw/dotnet-script). Otherwise i have to create a console application just to test something out. |
So this still is the case, that in order to use OmniSharp's services, one needs to create a full project, instead of using a single file? |
Nice - when will v1.16 be released with this? |
The latest version of the c# extension which includes intellisense support for standalone c# files is out. Please do give it a try. |
Merge omnisharp lsp engine
Seriously? What kind of editor is this?
If I need to follow certain instructions in order to get basic Intellisense on C# just to edit a single .cs file, then this needs to be really freaking obvious.
The text was updated successfully, but these errors were encountered: