I've got a problem with C# in Visual Studio Code.
Support, debug and intellisense for c# is not working on new and old project
I search for this problem and found nothing, idk what I should do...
before i reinstalled my pc this was working
You need to install the C# extension for VS Code
from extensions store
Intellisense in VS Code only shows the previously used keywords and identifiers(in the current program) and not suggesting the new ones.The autocomplete only suggests the previously used keywords and identifiers.
Disabling the c# extension then re-enabling and restarting the vs code solves this issue for me
This will help you buddy.
C# language support is an optional install from the Marketplace.
You can install it from within VS Code by searching for 'C#' in the Extensions view (Ctrl+Shift+X) or if you already have a project with C# files, VS Code will prompt you to install the extension as soon as you open a C# file.
Visual Studio Code uses the power of Roslyn and OmniSharp to offer an enhanced C# experience.
So to summarize, you will need two things to do dotnet development using C#.
Install .NET Core.
Install the C# extension from the VS Code Marketplace.
Refer: https://code.visualstudio.com/docs/other/dotnet
Refer: https://code.visualstudio.com/Docs/languages/csharp
While I can see this is a minor problem and rather annoying - VSCode will do this. It's what makes it different to (IE) Visual Studio (Community / Enterprise).
Since I use both I had to look for a solution myself. I currently use the package 'All Autocomplete' by Atishay Jain (https://github.com/atishay/vscode-allautocomplete).
Good luck coding!
Quick edit:
It will still not give you back all options for a class if there's no instance of that class (OO).
I closed VSCode, removed the workspace file and when I re-opened the folder with vscode with it asked me if I wanted to use a particular project file or read all project files in the folder.
Either choice would probably be fine as you will have been so annoyed by this issue, you would not get up to creating a second project :)
I have installed BrackedPairColorizer and when I deleted this extension form VS Code it helps and editor start suggesting code after reload.
I had this issue, solution for me was downgrading the C# extension from v1.25.0 to v1.24.1
Other versions may also work but this was the first that I tried
Hello recently I started using only visual studio code for my .net core 2 project.
The problem I have found is the intellisense not working as i expect in vs code.
Always after using '.' to access avaible methods and properties no suggestions appear I have to push "ctrl+space" for them to appear.
And when I push "ctrl+space" it comes with suggestions that I can't use for anything.
Linq Example for none working intellisense
Same happens when I try to access the properties of a class.
Is it possible to get intellisense that work like in normal visual studio? I have installed C# extension for debugging and intellisense.
Proof of installed plugins
I want to develop an VST plugin in C#. Looking around the internet there are not that many libraries in .NET that deal with VST plugins. The only thing I found is the VST.net library (https://vstnet.codeplex.com/). This thing hasn't been updated in a while.
The problem: I am having trouble setting it up the basic project. There are project templates for that project which are done for VS 2008/2010 which is .vsi file. I tried looking around for ways to open it in the latest VS (2017) but I was not successful.
Is there a way to open these in Visual Studio 2017 or should I have to install the older version of Visual Studio to make this work? Or if you have a suggestion for another library/extension that will help me with the development I would appreciate it.
Comments: I am aware that there is better support in C++ for this type of thing but my additional problem is that I have a project in C# that I would like to use and not be forced to rewrite the entire code base.
Thank you in advance for looking into this issue.
I want to write a new templating language, and I want Visual Studio to "support" it. What I need to know is:
How do I parse my new language?
Given some code in my new template language, how do I translate it into HTML? Right now I'm using regular expressions to parse it token by token, but I don't think this is going to scale very well as the language gets more complicated, and there's no error checking. I've heard of ANTLR but never used it. Would that be the right tool for this job, or is there perhaps something simpler? Ideally I'd like to send any syntax errors to the error window with as much information as possible (line #, type of error) like other languages do.
How do I create a new file type for Visual Studio?
How do I get syntax highlighting?
Can I use the same parser I created in step 1, or is this something entirely different?
How do I get Intellisense?
I'd prefer to write my parser in C#.
I would take a look at another language that has already done the legwork of integrating with Visual Studio. A great example is Boo. The language and Visual Studio integration are open source. So you can take a look at exactly what they had to do.
Boo Language: https://github.com/boo/boo-lang
Boo Syntax Highlighting for VS2010 (VSX add-in): http://vs2010boo.codeplex.com/
Boo Language Studio (syntax highlighting for VS2008): http://boolangstudio.codeplex.com/
The Boo Syntax Highlighting for VS2010 includes some recommended links on its homepage, which I'll copy for easy reference:
Nice article about "classification" (syntax highligting) in VS 2010: http://dotneteers.net/blogs/divedeeper/archive/2008/11/04/LearnVSXNowPart38.aspx
Examples for VSX add-ins: http://blogs.msdn.com/vsxteam/archive/2009/06/17/new-editor-samples-for-visual-studio-2010-beta-1.aspx
Regarding the Visual Studio aspects, what you need is a "language service", which is the entity that handles colorizing, intellisense, etc. for a given file extension/type.
For an intro, see this article
And for a code sample see here
Regarding parsing, there are lots of technologies, and I won't offer an opinion/advice.
Beware, there is a fair amount of work involved, although in my opinion it is much more straightforward in VS2010 than in previous versions of Visual Studio to provide this kind of extension.
See also
Visual Studio 2010 Extensibility, MPF and language services
I wrote a VS Language Service using this article as my basis:
http://www.codeproject.com/KB/recipes/VSLanguageService.aspx
It wasn't too bad if you have a basic handle on Grammars.
There is a sample in the VS SDK that shows most of the features you are looking for.
I was using VS with own language and desperately needed a syntax highlight. I built mine based on this tutorial: https://mattduffield.wordpress.com/2012/07/31/writing-a-brightscript-syntax-highlight-extension-for-visual-studio-2010/
I know the tutorial is in VS2010. I made mine in VS2012 with no or very small hiccups. (also worked in VS2013) Recently I changed to VS2015 and the solution can be edited, built with no problem.
I found this very useful collection of recent samples for Visual Studio 2013 SDK:
http://blogs.msdn.com/b/vsx/archive/2014/05/30/vs-2013-sdk-samples-released.aspx
It also contains the recent version of the OokLanguage which sounds promising.
We used ANTLR 4 to parse our language which works like a charm and allows direct interaction with C# code. Can totally recommend it.
As mentioned in other answers, the most interesting code sample is the Ook language extension for the latest version of Visual Studio (2017 at the time of writing).
For VS 2015 see the sample in the VS2015 branch.
In order to install the SDK for 2015 or later, you need to rerun the VS setup. In 2015 it's called "Visual Studio Extensibility Tools Update 3".