.NET nanoFramework enables the writing of managed code applications for embedded devices. Doesn't matter if you are a seasoned .NET developer or if you've just arrived here and want to give it a try.
The VS Code extension allows you to use VS Code to flash, build and deploy your C# code for .NET nanoFramework on your device regardless of the platform you're using. This has been tested on Mac, Linux (64 bits) and Windows (64 bits).
This .NET nanoFramework VS Code extension allow you to flash, build and deploy your C# .NET nanoFramework application on an ESP32 or STM32 MCU.
Select nanoFramework: Flash device
and follow the steps.
Based on the target you will select, the menus will automatically adjust to help you finding the correct version, DFU or Serial Port.
Once all options has been selected, you'll see the flashing happening:
Select nanoFramework: Build Project
and follow the steps.
If you have multiple solutions in the open folder, you'll be able to select the one to build:
Build result will be display in the Terminal:
Select nanoFramework: Deploy Project
and follow the steps.
Similar as building the project, you'll have to select the project to deploy. The code will be built and the deployment will start:
You'll get as well the status of the deployment happening in the Terminal.
Some ESP32 devices have issues with the initial discovery process and require an alternative deployment method.
If you're having issues with the deployment, you can use an alternative method: you have to select nanoFramework: Deploy Project (alternative method)
instead and follow the prompts, same as with the other steps.
You will need to make sure you'll have the following elements installed:
- .NET 6.0
- Visual Studio build tools on Windows,
mono-complete
on Linux/macOS
This extension will not allow you to debug the device. Debug is only available on Windows with Visual Studio (any edition) and the .NET nanoFramework Extension installed.
This extension will work on any Mac version (x64 or M1), works only on Linux x64 and Windows x64. Other 32 bits OS or ARM platforms are not supported.
nanoff
a dependency of the extension.
Note that if you're not using the extension with with STM32 devices, this limitation does not apply.