Solidity Smart Contract development on Windows

There are two main options to setup our environment for Solidity Smart Contract development on Windows.

The Microsoft recommendation is to use Windows Subsystem for Linux.

https://docs.microsoft.com/en-us/windows/nodejs/setup-on-windows#use-windows-subsystem-for-linux-for-production
Many Node.js packages and frameworks are created with a *nix environment in mind and most Node.js apps are deployed on Linux, so developing on WSL ensures consistency between your development and production environments.

Set up on Windows Subsystem for Linux (Windows 10)

I use Windows Subsystem for Linux (WSL2) on Windows 10.

See @Jshanks21 walkthrough for installing WSL:

Set up on native Windows

Install nvm (Node Version Manager)
(Note: There are alternate ways to install node such as nodejs installer: https://nodejs.org/en/download/ )

Then install Git:

Install Windows Build Tools:

If you are unpacking Starter Kits then you can use Git Bash terminal (thanks @pantsme).


For an editor, I recommend VS Code:

Along with @juanfranblanco's Solidity Extension:

The settings for use with OpenZeppelin are documented in the repository: https://github.com/juanfranblanco/vscode-solidity#openzeppelin


Note: This is a wiki post, please update/edit.

2 Likes

Hey there! That's great! As you mentioned, one of the main options recommended by Microsoft is to use Windows Subsystem for Linux (WSL). Using WSL allows you to work within a Linux environment directly within your Windows operating system. This is particularly useful for Node.js development, since many Node.js packages and frameworks are created with a *nix environment in mind. When setting up WSL on Windows 10, it's important to keep in mind that you'll need a valid Windows activation key to properly activate your operating system. Once you have that taken care of, you can follow the instructions provided by Microsoft to set up WSL on your machine.