DEMO: VS Code on Windows

Contents

keyboard_tab

The course is part of this learning path

A Practical Introduction to C# Programming
6
3
1
Start course
Overview
Difficulty
Beginner
Duration
37m
Students
347
Ratings
4.7/5
starstarstarstarstar-half
Description

If you want to know how to develop software using C# and you have little to no experience programming you've come to the right place. This is an introductory course to C# and .NET programming that is the first in a series that will show you how to use these dynamic cross-platform development tools.

In this course, we set the stage in two ways. First, you get an overview of the basic elements of computer programming and fundamental issues that face software development, and how .NET addresses those issues. Secondly, we set up our software development tools on Windows and a non-Windows platform. To test our development environments we create and run a simple C# .NET program.

Learning Objectives

  • Get a foundational understanding of computer programming and .NET
  • Learn how to set up a development environment
  • Learn how to run a simple C# .NET program

Intended Audience

This course is intended for anyone who wants to learn how to develop software using C#

Prerequisites

To get the most out of this course, you should have some basic understanding of programming, but it's not essential; this course can also be taken by complete beginners.

Transcript

As I said in the overview, what you can do in Linux, you can do in Windows. I'll quickly do the same VSCode set up in Windows as I did in Linux and start by downloading VSCode for Windows and installing the C# extension.

Using file explorer, I'll go to my repos folder and press Control+L to focus on the address bar. Then type CMD to open a command prompt in this location. As I did on the Linux box, I'll create a new .NET console application called HelloAgain, but this time I will use the F option to specify the framework I want to use, which is net5.0.

After that has been successfully created, I'll CD into the HelloAgain directory and start VSCode with code dot. When I open the program.cs file, I get prompted to configure the project as I did in Linux, and the .vscode folder is created.

Next, I'll run the build task from the terminal menu, but this time I'll run the application using the dotnet run command from within the Visual Studio Code terminal. You can also run Visual Studio from a command prompt. I'll go back to the original HelloMars solution and type start devenv, for development environment, HelloMars.sln, with HelloMars.sln being the solution file.

Sure enough, that correctly opens the solution within Visual Studio. Start devenv only works when you have one version of Visual Studio installed. If you have more than one version on your PC, you will need to specify the full path to the devenv executable.

 

About the Author
Avatar
Hallam Webber
Software Architect
Students
14756
Courses
27
Learning Paths
3

Hallam is a software architect with over 20 years experience across a wide range of industries. He began his software career as a  Delphi/Interbase disciple but changed his allegiance to Microsoft with its deep and broad ecosystem. While Hallam has designed and crafted custom software utilizing web, mobile and desktop technologies, good quality reliable data is the key to a successful solution. The challenge of quickly turning data into useful information for digestion by humans and machines has led Hallam to specialize in database design and process automation. Showing customers how leverage new technology to change and improve their business processes is one of the key drivers keeping Hallam coming back to the keyboard. 

Covered Topics