简体   繁体   English

我如何在 VS Code 或 Mac 中使用 Visual Basic?

[英]How do i work in Visual Basic in VS Code or Mac?

sorry if the question is basic or does not have an answer but i have began my coding journey and due to classes i need to program basic code in "Visual Basic".对不起,如果问题是基本的或没有答案,但我已经开始了我的编码之旅,并且由于课程我需要在“Visual Basic”中编写基本代码。

I have a Windows PC where i can code fine in Visual Studio 2022, but i have a MacBook Air as my laptop, i would like to code visual basic on it as well just small codes for my exams and class, i downloaded Visual Studio for Mac and it only allowed me to code in "C#" then i tried VS Code and selected VB on it, Python (With its extension) worked fine on VS Code, i can enter and run my code in the terminal but vb would always be a house of errors.我有一台 Windows PC,我可以在 Visual Studio 2022 中很好地编码,但我有一台 MacBook Air 作为我的笔记本电脑,我想在上面编写 visual basic 以及我的考试的小代码和 class,我下载了 Visual Studio for Mac,它只允许我在“C#”中编写代码,然后我尝试了 VS Code 并在其上选择了 VB,Python(及其扩展名)在 VS Code 上运行良好,我可以在终端中输入并运行我的代码,但 vb 始终是一个错误的房子。

My question is, what is the appropriate way to program in visual basic on a mac (Latest macOS) (M1 Chip) and how can i get visual basic to work in VS Code?我的问题是,在 mac(最新的 macOS)(M1 芯片)上使用 visual basic 进行编程的合适方法是什么?我怎样才能让 visual basic 在 VS Code 中工作?

Really appreciate anyone's time spent on answering this, have a good one!非常感谢任何人花时间回答这个问题,祝你玩得开心!

Spent alot of hours downloading extensions that would help me run VB Code on VS Code, tried to get Visual Basic on Visual Studio for mac and that didnt help either.花了很多时间下载可帮助我在 VS Code 上运行 VB Code 的扩展,尝试在 Visual Studio for mac 上获取 Visual Basic,但都没有帮助。

The only thing that works right now is visual basic on visual studio 2022 on my windows pc.现在唯一可用的是我 windows 电脑上 visual studio 2022 上的 visual basic。 i want to code in vb on my mac.我想在我的 mac 上用 vb 编码。 Python on vs code etc works fine not vb. Python 在 vs code 等上工作正常而不是 vb。

Visual Basic is not officially supported on Visual Studio Code or Visual Studio for Mac. Visual Studio Code 或 Visual Studio for Mac 不正式支持 Visual Basic。 However, there are some third-party extensions that you can use to add support for Visual Basic on VS Code.但是,有一些第三方扩展可用于在 VS Code 上添加对 Visual Basic 的支持。

One such extension is "V.NET for Visual Studio Code" which can be found in the VS Code extension marketplace.一个这样的扩展是“V.NET for Visual Studio Code”,它可以在 VS Code 扩展市场中找到。 This extension is a community-supported extension and may not be as stable as the official extensions.此扩展是社区支持的扩展,可能不如官方扩展稳定。

Alternatively, you can use a Windows virtual machine on your Mac to run Visual Studio 2022 and use it to write and run Visual Basic code.或者,您可以在 Mac 上使用 Windows 虚拟机来运行 Visual Studio 2022,并使用它来编写和运行 Visual Basic 代码。 This would allow you to use Visual Studio 2022 on your Mac, and you can work with Visual Basic code on your Mac.这将允许您在 Mac 上使用 Visual Studio 2022,并且您可以在 Mac 上使用 Visual Basic 代码。

It's worth noting that Visual Basic is not a popular language as it was in the past, many developers are not familiar with it and support for it is limited.值得注意的是,Visual Basic 不像过去那样是一种流行的语言,许多开发人员对它并不熟悉,对它的支持也很有限。 If you have the opportunity, it might be worth your time to learn a more widely used and supported language like C# or Python.如果有机会,可能值得花时间学习更广泛使用和支持的语言,例如 C# 或 Python。

where VS Code is a powerful, multi-language code editor that offers many features and customization options, making it a great choice for developers.其中 VS Code 是一款功能强大的多语言代码编辑器,提供许多功能和自定义选项,是开发人员的绝佳选择。 It can be used for Visual Basic development and it's a good alternative for Visual Studio for Mac which does not support Visual Basic.它可以用于Visual Basic开发,是不支持Visual Basic的Visual Studio for Mac的一个很好的替代品。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM