Developing .NET nanoFramework VS Code extension
April 7, 2026 ยท View on GitHub
This document provides details on how to setup your local environment to develop and code for the extension. Along with some general guidelines about it.
Prerequisites
The following packages/tools/frameworks are required on all platforms:
Platform-Specific Requirements
Windows
- .NET Framework 4.8 (included in Windows 10/11, or install via Visual Studio Build Tools)
- PowerShell 5.1+ (included) or PowerShell 7+ (recommended)
macOS
-
PowerShell 7+ (required) - macOS 13 (Ventura) or later required
Install via Homebrew (recommended):
brew install --cask powershellOr via .NET Global Tool (if .NET SDK is installed):
dotnet tool install --global PowerShellOr download directly from PowerShell Releases
-
Xcode Command Line Tools (recommended):
xcode-select --install
Linux
-
PowerShell 7+ (required)
Ubuntu/Debian:
# Install prerequisites sudo apt-get update sudo apt-get install -y wget apt-transport-https software-properties-common # Download and register Microsoft repository wget -q "https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb" sudo dpkg -i packages-microsoft-prod.deb rm packages-microsoft-prod.deb # Install PowerShell sudo apt-get update sudo apt-get install -y powershellRHEL/Fedora:
# Register Microsoft repository curl https://packages.microsoft.com/config/rhel/8/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo # Install PowerShell sudo dnf install -y powershellSnap (Universal):
sudo snap install powershell --classic -
mono-complete with msbuild
Note: Do not use the
mono-completepackage provided by your Linux distribution
as it may not includemsbuildwhich is required for this extension to work.Instead install the
mono-completepackage provided by the Mono Project.
The preview version is recommended as the stable version is outdated.
Note: The
.slnxsolution format requires a recent Mono/MSBuild version.
If your Mono installation does not support.slnx, use the classic.slnformat.
Note: If you're running into a
langversion:9error, try installing the latest mono-nightly.
Verify PowerShell Installation
Before proceeding, verify PowerShell is installed correctly:
pwsh --version
# Should output: PowerShell 7.x.x
Install steps
- Clone repository and
cdinto it - Run
npm install - Run the build script:
- Windows (PowerShell 5.1+):
.\scripts\build.ps1 - Windows (PowerShell 7+):
pwsh .\scripts\build.ps1 - macOS/Linux:
pwsh scripts/build.ps1or./scripts/build.sh
- Windows (PowerShell 5.1+):
- Open in Visual Studio Code (
code .)
Debugging extension
- Press F5 to debug
- Set breakpoints at will
- Move to the new VS Code instance window
- Load a directory with a project or go to Command Palette and choose one of the nanoFramework commands
Dependencies
The extension uses the following key npm packages:
- serialport - Cross-platform serial port enumeration (native bindings auto-installed)
- axios - HTTP client for firmware downloads
- globby - File pattern matching
Native bindings for serialport are automatically downloaded during npm install for your platform.
Updating the dependencies
The extension depends on .NET nanoFramework msbuild components provided by the VS extension.
To update to a new version go to the build.ps1 and set the $vsExtensionVersion variable to the desired Git tag.
Make sure to commit these update changes in an individual commit to the upstream repository.