Join Walt Ritscher for an in-depth discussion in this video What languages are supported in Visual Studio 2015?, part of Visual Studio 2015 Essentials 04: Surveying the Programming Languages.
- View Offline
- If you've watched my other Visual Studio courses, you've heard me praise its virtues. I've described its rich feature set, the debugging, testing, and collaboration tools, and I've talked about how it integrates with Team Foundation Server. But we're coders. We love to get our fingers on the keyboard and write our code. And to write that code, you need to choose a programming language. In this course, I'll talk about the programming languages supported in Visual Studio. Out of the box, Visual Studio supports 18 programming script, markup, and domain-specific languages.
What do I mean by support? Well, if a programming language is supported, it means that you'll have code editors available for writing your code. If a markup language is supported, it means you'll have markup editors available for writing markup. Some of the time, a markup editor also has a visual editor available for those programmers who prefer a visual approach to designing markup. I'll examine some of these code editors I just mentioned. To do that, I'll use the code in the RoboSpeech_WPF project. First thing I'll look for is a C# file. Here's one.
Let's look inside this FunctionDeclare.html file. This is an .html file, but on line seven, I have a script block, and that means I can define code in here, like I'm doing on line 20, I'm defining a function, an add function, and you see I have color coding for the var keyword and the return keyword, the section of code is collapsible. I can also get Intellisense; when I type in R-E-T, I see that one of my choices is "return", then I can press Tab twice to stub in the rest of the code.
So when I open up this file, you'll see that I have a split window, and the window can be split horizontally or vertically, I'm clicking on this button here, move it back to vertical split by clicking on this button. On the right side of the screen is the .xaml markup; on the left side of the screen is the Visual Editor. So, if you are the type of developer who prefers to use a mouse and to look at the arrangement of your UI while you're working on it, use this designer. I'll show you what I mean. I'll select this button, and I realize that this button needs to be on the right side instead of the left side, so I'll pick it up and drag it to its new position, and then let go.
That changed the markup over here. Microsoft provides four core programming languages in Visual Studio: C++, C#, Visual Basic and F#. Applications built with these languages are compiled into an executable file. I'll show you how to create one of those project types. Open File, New, Project, then look at Template section. Each one of these nodes in here represents one of the language types that's supported inside Visual Studio. You see I have four of them here listed at the top.
You may not see Visual F# on your computer if you didn't install F# when you installed Visual Studio. But that's easy to rectify, you can always go back and add it later. Projects using these four languages need to be compiled, therefore, there is a Build menu available for the project types. Microsoft includes compilers for each language. Let me select this F# project, then go to the Build menu. On the bottom half of the Build menu are options for building this particular project. I'll use Rebuild; that takes any code that I've already compiled and throws it out and creates a brand new executable.
I'll choose this second item and click, in the output window across the bottom of the screen, you can see that I had a "Rebuild All: 1 succeeded". This will also work with languages like Visual Basic, so I'll move to the Solution Explorer, click on the Visual Basic project, return back to the Build menu. Now the bottom half of the menu has options for building and compiling VB code. Visual Studio also supports a group of scripting languages. Now I'll show you how to find which scripting languages are installed and available in Visual Studio. To do that, move to the Tools menu, and choose Options.
That concludes this discussion of supported languages in Visual Studio. Remember that Visual Studio is extensible, so third parties can create editors, compilers and other language-specific tools and plug them into the IDE. For example, if you like PHP, you can add it to Visual Studio and start writing code in PHP. I'll discuss this later in the course. For now, why not watch the next video where I explore some common features that are present in most programming languages.