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

Fully Support Visual Basic (VB) #25

Closed
egamma opened this issue Jan 30, 2016 · 32 comments
Closed

Fully Support Visual Basic (VB) #25

egamma opened this issue Jan 30, 2016 · 32 comments

Comments

@egamma
Copy link
Contributor

egamma commented Jan 30, 2016

From @habakuk007 on January 29, 2016 13:23

VB is compared to C# the advanced language - fully support it.

Copied from original issue: microsoft/vscode#2538

@kolbma
Copy link

kolbma commented Jun 15, 2016

I'd like to see Visual Basic .Net support in Visual Studio Code, too.
Of course including all the features it provides for C# development.
This would be awesome because there is no good working IDE for VB .Net next to Visual Studio, which is only running on Windows platform.
So this would be a major step to push VB .Net language usage, when you can use all supported platforms to develop with VB .Net.

@borgdylan
Copy link

👍 for Vb. I also recommend a language neutral way of handling the msbuild project file for any .net language since the XML structure would be identical.

@jaxspades
Copy link

I'd love to see support for it as well. +1

@sunheat
Copy link

sunheat commented Jan 11, 2017

Save developers who have to work with legacy code written in VB6 like myself.

Voting for this one. +1

@DustinCampbell DustinCampbell removed this from the future milestone Feb 7, 2017
@Falthazar
Copy link

I would like to see this as well! +1

@tthiery
Copy link

tthiery commented Aug 15, 2017

It is a pity that VB is not supported. .NET Core supports it now, and considering the beginner-friendly and business-friendly nature of VB, it would be a great addition to omnisharp-roslyn and omnisharp-vscode.

@pemo11
Copy link

pemo11 commented Oct 18, 2017

What really missing is Debugger support especially since .NET Core 2.0 finally supports the VB language and offers a few templates.

@ghost
Copy link

ghost commented Jun 26, 2018

+1, thumbs up, whatever is needed to get this implemented

@sharkguto
Copy link

+1

@shodanx2
Copy link

I was going to ask, is vb.net supported ? But seeing this thread, I have to assume this extension only supports C# and not vb.net . I think that is going to prevent me from switching for full visual studio to visual studio code

@gustavomf-cit
Copy link

+1 👍

@loligans
Copy link

Does up-voting increase the likelihood of this feature being implemented? What do we, as users of OmniSharp, need to do in order to draw attention to this feature?

@shodanx2
Copy link

shodanx2 commented Sep 18, 2018 via email

@loligans
Copy link

loligans commented Sep 19, 2018

Would it make a difference if donations were sent to the omnisharp team for VB.NET integration with VSCode? @david-driscoll @DustinCampbell

This feature request was added to the Future milestone which is no longer active. Should it be moved to the backlog milestone?

@oleg-shilo
Copy link

You may want to try CS-Script VS-Code extension. It supports VB.NET since Apr 2018:

vscode_vb

@E4N
Copy link

E4N commented Oct 5, 2018

Upvoted, would love to use VB.NET on VSCode.

@IdkGoodName
Copy link

You may want to try CS-Script VS-Code extension. It supports VB.NET since Apr 2018:

vscode_vb

Apparently, it doesn't work for me at least. CS-Script isn't that good at supporting VB.NET. Also, no syntax highlight fix...

@oleg-shilo
Copy link

Could you please elaborate?

@Fleischhauer
Copy link

No VB yet?? Do it!

@oleg-shilo
Copy link

I am not sure I understand what you are trying to say.

VB is supported by CS-Script plugin since Apr 2018. VSCode does Syntax highlight and CS-Script does intellisense, execution and debugging. The screenshot (two posts above) illustrates it.

So "doesn't work for me" and "do it" without any details do not help the discussion.

@APerricone
Copy link

CS-Script does not have outline on VB files...

@jaxspades
Copy link

@oleg-shilo Thanks for the extension. It's a great way to execute C# and VB like Python. Does it work with VS Projects too?

@oleg-shilo
Copy link

If you mean Visual Studio then yes.

If you mean opening .csproj file in VSCode. Then NO :(
CS-Script follows Python approach. A single script file is a complete expression of all runtime dependencies: f.cs files, assemblies and packages. So .csproj does not have role in any scripting scenario.

@oleg-shilo
Copy link

oleg-shilo commented Mar 13, 2020

CS-Script does not have outline on VB files

CS-Script does not implement outlining at all but only intellisense operations, execution and debugging integration. Outlining is the responsibility of IDE. You can use CodeMap extension. It supports 10 languages including C#. But for VB you will need to extend it:
https://marketplace.visualstudio.com/items?itemName=oleg-shilo.codemap

@cartermp
Copy link

Closing this as by design. The C# plugin is for C# and there will be some future investments that may allow for a proper VB plugin to be built that uses the same core Roslyn-based infrastructure. But there aren't any plans to incorporate a full fidelity VB experience into the C# OmniSharp experience.

@govert
Copy link

govert commented Jul 29, 2020

@cartermp Could you please clarify a bit what the current status of Visual Basic is for OmniSharp (and/or VS Code):

  • Does your comment and closing the issue mean that OmniSharp is strictly a C# language service, and that a Roslyn-based Visual Basic language service would have to be developed as a fork / from scratch and not as part of the OmniSharp project?
  • If so, do you know of any such project that one could contribute to?
    (It's a bit surprising, since the compilers, workspaces and other infrastructure of Visual Basic is shared in Roslyn.)

@chtenb
Copy link

chtenb commented Jan 30, 2021

@cartermp Could you please respond to the above questions and elaborate on this decision. There are a lot of people that have to work with legacy VB code.

@rogerbk
Copy link

rogerbk commented Sep 9, 2021

CS-Script does not have outline on VB files

CS-Script does not implement outlining at all but only intellisense operations, execution and debugging integration. Outlining is the responsibility of IDE. You can use CodeMap extension. It supports 10 languages including C#. But for VB you will need to extend it:
https://marketplace.visualstudio.com/items?itemName=oleg-shilo.codemap

Could you please elaborate?

Hey man, I did the setup in visual studio code and not is working, could you please share some step by step?

@oleg-shilo
Copy link

CodeMap does not have built-in support for VB so you will need to enable it by setting up a new VB custom mapper. It is actually quite simple. You have two choices. Either define a tiny TS class that analyses the specified document lines and "marks" your functions as outlining elements or simply define (in the VSCode settings file) a regular expression that detects VB functions. This is the simplest approach even though it is less flexible:

The guide is here: https://github.com/oleg-shilo/codemap.vscode/wiki/Adding-custom-mappers

For VB syntax you simply need to add this section in the VSCode settings.json:

 "codemap.vb": [
    {
      "pattern": "[Cc]lass .*",
      "clear": "",
      "suffix": "",
      "role": "class",
      "icon": "class"
    },
    {
      "pattern": "([Ff]unction|[Ss]ub) (.*?)[(|:{]",
      "clear": "[Ff]unction |[Ss]ub |\\(",
      "suffix": "()",
      "role": "function",
      "icon": "function"
    }
  ],

image

It is my very quick and dirty solution but you may further experiment with it.

But this is what it does:
image

@oleg-shilo
Copy link

In fact, I have just published the extension update so you can get your VB mapper if you just update the extension

@rogerbk
Copy link

rogerbk commented Sep 10, 2021

In fact, I have just published the extension update so you can get your VB mapper if you just update the extension

Thank you. Is working now. Other question, sorry for many questions. I am setup notepad ++ to use visual basic .net
I cannot find the file css_config. Dont know how to run the command. It is indicatind that the file css_config does not exist

https://www.cs-script.net/cs-script/help-legacy/Config.html

@shodanx2
Copy link

This is great new, could someone currently using VB recap this thread with a trial of the current state of things programming visual basic in visual studio code and with omnisharp ?

Does debugging work, does intellisense work properly and in context ?

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