Software Developer, Tech Enthusiast, Runner.
It was the summer of 2015 when Visual Studio Code made its appearance. At first sight, it was extremely hard to believe that something like this was going to be open-source software.
In the past, Microsoft had made a reputation of being anti-open-source. At one point, former CEO Steve Ballmer even referred to it as a “cancer”. However, with Satya Nadella taking the reigns of the massive company, views of open source computing have drastically changed. He even proclaimed that “Microsoft ❤️ Linux”.
Eventually, I figured out that Visual Studio Code was completely free and not a joke. I immediately downloaded and installed it. Unfortunately, I didn’t explore much further than that. The application had just been released and was lacking a lot of support for different programming languages. It wasn’t until a few years later when I would again pick up VS Code. This time, I was rather impressed by how much had been accomplished in such a short time. The IDE (Integrated Development Environment) has support for hundreds of programming languages and contains thousands of extensions.
Even with support for all those languages and the addition of so many extensions, the one thing that got me really excited was .NET Core. For those who may not know, this is one of Microsoft’s latest frameworks that is completely free (a radical shift for Microsoft). It has support
for C#, F#, and VB.NET and is also cross-platform.
Now that Visual Studio Code has become much more mature, I’m able to use it nearly every day. However, I use the open-source version provided by coder.com called code server. Essentially, I have the latest version running on one of my servers and am able to enjoy nearly all of the same benefits that the desktop version would provide.
Alongside my development environment, I obviously need to have .NET Core installed. Accomplishing this is pretty trivial using the following
commands:
wget https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
This will download the Debian package of the framework. Once you have this, the SDK (Software Development Kit) can be installed:
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-5.0
The last piece needed is the runtime that lets us run the apps.
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y aspnetcore-runtime-5.0
Before being able to fully get started, there are a couple of VS Code extensions that I highly recommend.
Normally, you can use the command line to run your project using commands such as these:
dotnet build
dotnet run
Lucky for us, this tool simplifies the process. All you have to do is right-click on the “.csproj” file within your project, and you can build and run the project from that. No more having to “cd” to the project directory!
This extension is essential for anyone wanting to write C# code in Visual Studio Code. In a nutshell, it provides support for
csproj
and allows for debugging. It also gives developers tools such as syntax highlighting, IntelliSense, Find All References, and Go to Definition.It seems crazy that Microsoft has a done a complete one-eighty of their position on open-source software. The amount of software they are letting the community drive is incredible. Even longtime Windows-only tools such as SQL Server are now available on Linux. Going in the right direction, Microsoft!
Until we chat again, cheers! Sign up to join my mailing list here.
This story is previously published here.