vb.net 如何在 Mac 上的 Visual Studio 中创建和运行 Visual Basic 代码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43699471/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-17 20:16:05  来源:igfitidea点击:

How to create and run Visual Basic Code on Mac in Visual Studio

vb.netvisual-studio

提问by Charlie

I have spent countless hours trying to figure this out, but I just can't seem to. I hope you have the patience to read my problems and help me fix them.Here we go. I am taking a Visual Basic course online for my school. Since our school has no PC and just Macs, I am running into a few issues. Our teacher wants us to use Visual Studio, which I have downloaded for Mac. We were told to create a project using visual basic. I followed the instructor and attempted to do what he did. I open Visual Studio, create a new project, select the code to be VB (not C# or anything else) and prepare to start coding. I start to type and I am not able to as a pop up box says "No completions found". All I want to do is just make my code in a .vb file (which is the format the teacher wants... will they accept a vb.NET file, idk what that is) and be able to run it in Visual Studio. But nothing is working out for me. All the tutorials online show how to create projects in Mac and run them, but for C#. I did research and it said to download Mono, and I did, but I don't know what to do with it. If anyone can please help, I will be fulfilled with tremendous gratitude. Thank you.

我花了无数个小时试图弄清楚这一点,但我似乎无法做到。我希望你有耐心阅读我的问题并帮助我解决它们。我们开始吧。我正在为我的学校在线学习 Visual Basic 课程。由于我们学校没有 PC,只有 Mac,我遇到了一些问题。我们的老师希望我们使用我为 Mac 下载的 Visual Studio。我们被告知使用 Visual Basic 创建一个项目。我跟着老师,试图做他做的事情。我打开 Visual Studio,创建一个新项目,选择代码为 VB(不是 C# 或其他任何东西)并准备开始编码。我开始输入,但我无法输入,因为弹出框显示“未找到完成项”。我想要做的就是将我的代码放在 .vb 文件中(这是老师想要的格式……他们会接受 vb.NET 文件吗,知道那是什么)并能够在 Visual Studio 中运行它。但没有什么对我有用。所有在线教程都展示了如何在 Mac 中创建项目并运行它们,但适用于 C#。我做了研究,它说要下载 Mono,我确实做到了,但我不知道该怎么做。如果有人可以请帮助,我将非常感激。谢谢你。

采纳答案by HappyBono

VB.NET is not the first batch of languages to be supported on VS Code. You should use C# or F# instead.

VB.NET 并不是 VS Code 支持的第一批语言。您应该改用 C# 或 F#。

These are supported programming languages for Visual Studio Code at the moment : JavaScript, JSON, HTML, CSS, Sass, Less, TypeScript, Markdown, PHP, Python, Go, Dockerfile, T-SQL, C#, C++

目前 Visual Studio Code 支持的编程语言有: JavaScript、JSON、HTML、CSS、Sass、Less、TypeScript、Markdown、PHP、Python、Go、Dockerfile、T-SQL、C#、C++

Thank you.

谢谢你。

回答by Marco de Boer

You can use another program called Rider from Jetbrains. You are a student so you can use Rider for free.

您可以使用 Jetbrains 的另一个名为 Rider 的程序。您是学生,因此可以免费使用 Rider。

http://www.jetbrains.com/rider/

http://www.jetbrains.com/rider/

You can choose for Library projects and console app projects, but that is for a start more than enough.

您可以选择库项目和控制台应用程序项目,但这已经足够了。

Jetbrains Rider

Jetbrains 骑士