Writing and Testing in C# in Linux with Visual Studio Code.

 

Visual Studio Code is an open source IDE useful for developing in many different languages on nearly any platform. If you've ever used Eclipse, you'll find it similar. 
There are many extensions you can add to it to allow you to debug, run, and test using nearly any tool you can think of. Since I'm focusing on C#, one of the first things you'll need is dotnet. 

Using the Extension Manager, I've installed:
.NET Extension Pack (from Microsoft)
.NET Install Tool (from Microsoft)
C# (from Microsoft)
C: Dev Kit (from Microsoft)



With those installed, you can now open the command pallet (cntrl+shift+p) and do things like create new projects. 


However, to get access to some of the useful "Visual Studio Explorer" style menu items, you'll need to install that separately from Microsoft. It's available here:
https://code.visualstudio.com/docs/?dv=linux64_deb

What this extension allows you to do, is right click on a project and "add a reference" to another project. 
If you're writing unit tests, you will first create your actual project using the command pallet. Then create a separate unit testing project also using the command pallet. 
If you've installed the Visual Studio Explorer, you can now click on your unit testing project and add a reference to your other project(s) and easily unit test them using the test explorer tab located on the side of visual studio code. 

Comments

Popular posts from this blog

Organize your Arduino code with header and class files

Using GIT with Arduino

Programming Arduino with Regular Expressions