Skip to main content

Installation

NuGet Packages

Most users start with Nethereum.Web3, which pulls in all core dependencies:

dotnet add package Nethereum.Web3

For specific functionality, install targeted packages:

# HD wallet support
dotnet add package Nethereum.HDWallet

# EIP-712 typed data signing
dotnet add package Nethereum.Signer.EIP712

# Blockchain data indexing to PostgreSQL
dotnet add package Nethereum.BlockchainStore.Postgres

# Account abstraction (ERC-4337)
dotnet add package Nethereum.AccountAbstraction

# MUD framework
dotnet add package Nethereum.Mud

See the Component Catalog for the complete list of 130+ packages.

Project Templates

Nethereum provides dotnet new templates to get started quickly.

Templates Pack

dotnet new install Nethereum.Templates.Pack

This installs templates for:

TemplateCommandDescription
Smart Contract Librarydotnet new smartcontractERC-20 example with tests and code generation
ERC721/ERC1155 OpenZeppelindotnet new nethereum-erc721-ozNFT development with OpenZeppelin
Blazor MetaMaskdotnet new nethereum-mm-blazorBlazor + MetaMask integration (Wasm and Server)
Blazor SIWEdotnet new nethereum-siweSign-In with Ethereum authentication
WebSocket Streamingdotnet new nethereum-ws-streamReal-time blockchain data streaming

Aspire DevChain Template

dotnet new install Nethereum.Aspire.TemplatePack
dotnet new nethereum-devchain -n MyChain
cd MyChain/AppHost && dotnet run

This creates a complete Aspire-orchestrated development environment with:

  • DevChain node — in-process Ethereum node with prefunded accounts
  • PostgreSQL — database for blockchain data storage
  • Blockchain indexer — crawls and stores blocks, transactions, and logs
  • Blazor explorer — web-based blockchain explorer with ABI-decoded contract interaction
  • Account abstraction bundler — ERC-4337 UserOperation bundler
  • Load test generator — automated transaction load testing

All components are wired together and start with a single dotnet run. See the DevChain section for details.

Unity

Nethereum supports Unity with pre-compiled .NET Framework 4.7.2 / netstandard AOT runtime libraries.

  1. Open Edit → Project Settings → Package Manager
  2. Add a scoped registry:
    • Name: package.openupm.com
    • URL: https://package.openupm.com
    • Scope: com.nethereum.unity
  3. Open Window → Package Manager, search for com.nethereum.unity and install

Or add directly to Packages/manifest.json:

{
"scopedRegistries": [
{
"name": "package.openupm.com",
"url": "https://package.openupm.com",
"scopes": ["com.nethereum.unity"]
}
],
"dependencies": {
"com.nethereum.unity": "4.19.2"
}
}

Install via Git

  1. Open Unity → Window → Package Manager
  2. Click "+" → "Add package from git URL..."
  3. Enter: https://github.com/Nethereum/Nethereum.Unity.git

Additional Resources

WebGL

For WebGL builds using async/await, you need the WebGLThreadingPatcher. For Unity V6, use Nethereum's fork which includes compatibility fixes.

Supported Platforms

TargetScope
netstandard 2.0, net451, net461, net6.0, net8.0, net9.0, net10.0Core libraries
net8.0, net10.0CoreChain, AppChain, Server components
net6.0–net10.0Blazor UI
net461, net472, netstandard 2.1Unity

Nethereum runs on Windows, Linux, macOS, Android, iOS, WebAssembly, and game consoles.

Next Steps