Workshop for programming smart contracts with .NET, C# and Visual Studio (csharp-smart-contract-workshop)
NEO Blockchain C# Developers Center of Excellence
The original idea as well as the structure, and content of this workshop was created by Chris Hager (@metachris) for the NEO Python community: Workshop for programming smart contracts with Python (python-smart-contract-workshop) (https://github.com/CityOfZion/python-smart-contract-workshop).
This C# version of the workshop, Workshop for programming smart contracts with .NET, C# and Visual Studio (csharp-smart-contract-workshop) (https://github.com/mwherman2000/csharp-smart-contract-workshop), is a parallel effort based on Chris's original workshop content (March 2018).
- Hands-on smart contract development workshop: .NET/C#/Visual Studio on the NEO Blockchain
- Target audience: Architects and Developers who are new to the NEO Blockchain platform
- Background: Very little or no previous NEO or .NET/C#/Visual Studio Experience
- Background: Understand basic 1st and 2nd generation blockchain technologies: hashing, blocks, mining, etc.
- Provide you with a basic level of awareness and understanding of NEO smart contract development
- Help create a strong NEO Blockchain Developer community – helping each other
- Provide reliable documentation: timely, accurate, visual, and complete
- Save as much of a person's time as possible
- Use open source software whenever possible
- Need in the NEO .NET developer community to have concise and easy-to-follow documentation to enable people to get up to speed developing NEO smart contracts in as short a time as possible
Join Discord NEO Developer Community on Discord by clicking on one of the following links:
Download and install Microsoft Visual Studio Community Edition 2017. This version is free to download and free to use. It is an excellent IDE for C# smart contract development from here:
Download and install the .NET 4.7.1 Dev Pack from here:
Build the NEO Debugger Tools
Download the NEO Debugger Tools source code from here:
Create a new folder on your hard drive – for example
c:\reposCopy
master.zipintoc:\repos.Unzip
master.zipand build the NEO Debugger Tools following the steps in the diagram below.
Lastly, update your Windows PATH environment variable to include the path to the NEO Compiler
neon.exeby typing the following into the Windows command prompt [Reference]:
setx PATH "%PATH%;C:\Repos\neo-debugger-tools-master\NEO-Compiler\bin\Debug"
NOTE Use the setx command - not the set command.
NOTE Do not use an = (equals) sign.
NOTE If you unzipped master.zip into a different folder or onto a different hard drive, change the setx command to use the folder you chose.
Module 1: Runtime.Log(), Runtime.Notify(), and NEO Storage
- Lab 1 - lab1_log.cs - click here for the solution
- Lab 2 – lab2_logandnotify.cs - click here for the solution
- Lab 3 – lab3_storage.cs - click here for the solution
Module 2: NEO Smart Contract Patterns
- Lab 4 – lab4_processoperationpattern.cs - click here for the solution
- Lab 5 – lab5_domain.cs - click here for the solution
- Lab 6 – lab6_NEP5pattern.cs - click here for the solution
NEO Blockchain C# Developers Center of Excellence (neo-csharpcoe)
Workshop for programming smart contracts with Python (python-smart-contract-workshop)
If you have any issues or ideas for improvements, please leave your feedback on the GitHub Repository and in the #csharp channel in NEO Discord Group.
What is the NEO Blockchain C# Developers Center of Excellence?
The neo-csharpcoe project is an "umbrella" project for several initiatives related to providing tools and libraries (code), frameworks, how-to documentation, and best practices for Enterprise Distributed Application development using .NET/C#, C#.NEO and the NEO Blockchain software platform.
The neo-csharpcoe is an independent, free, open source project that is 100% community-supported by people like yourself through your contributions of time, energy, passion, promotion, and donations.
To learn more about contributing to the neo-csharpcoe, click here.

