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:
| Template | Command | Description |
|---|---|---|
| Smart Contract Library | dotnet new smartcontract | ERC-20 example with tests and code generation |
| ERC721/ERC1155 OpenZeppelin | dotnet new nethereum-erc721-oz | NFT development with OpenZeppelin |
| Blazor MetaMask | dotnet new nethereum-mm-blazor | Blazor + MetaMask integration (Wasm and Server) |
| Blazor SIWE | dotnet new nethereum-siwe | Sign-In with Ethereum authentication |
| WebSocket Streaming | dotnet new nethereum-ws-stream | Real-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.
Install via OpenUPM (recommended)
- Open Edit → Project Settings → Package Manager
- Add a scoped registry:
- Name:
package.openupm.com - URL:
https://package.openupm.com - Scope:
com.nethereum.unity
- Name:
- Open Window → Package Manager, search for
com.nethereum.unityand 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
- Open Unity → Window → Package Manager
- Click "+" → "Add package from git URL..."
- Enter:
https://github.com/Nethereum/Nethereum.Unity.git
Additional Resources
- Nethereum.Unity repository — full setup guide
- Unity3dSampleTemplate — example project template
- GitHub Releases — compiled libraries included in each release
For WebGL builds using async/await, you need the WebGLThreadingPatcher. For Unity V6, use Nethereum's fork which includes compatibility fixes.
Supported Platforms
| Target | Scope |
|---|---|
| netstandard 2.0, net451, net461, net6.0, net8.0, net9.0, net10.0 | Core libraries |
| net8.0, net10.0 | CoreChain, AppChain, Server components |
| net6.0–net10.0 | Blazor UI |
| net461, net472, netstandard 2.1 | Unity |
Nethereum runs on Windows, Linux, macOS, Android, iOS, WebAssembly, and game consoles.
Next Steps
- Your First Project — build something in 5 minutes
- Choosing How to Connect — public RPC vs local DevChain vs IPC