Show / Hide Table of Contents![Mac Mac](/uploads/1/1/9/6/119612607/917444023.png)
This document will guide you through the process of setting up the C# development environment in macOS, creating contract projects with sample code, and compiling the smart contract.
![Mac Mac](/uploads/1/1/9/6/119612607/917444023.png)
Downloading Visual Studio for Mac
Sharp's versatile lineup of digital MFPs offers secure, high-quality, environment-friendly document solutions that keep pace with your growing business.
.NET 5.0 downloads for Linux, macOS, and Windows.NET is a free, cross-platform, open-source developer platform for building many different types of applications. Naughty Girl (Feat. C Sharp, Mac Tae & Dj Vlad) is a popular song by C-Lim Create your own TikTok videos with the Naughty Girl (Feat. C Sharp, Mac Tae & Dj Vlad) song and explore 0 videos made by new and popular creators. Sponsored by Microsoft, Mono is an open source implementation of Microsoft's.NET Framework based on the ECMA standards for C# and the Common Language Runtime.A growing family of solutions and an active and enthusiastic contributing community is helping position Mono to become the leading choice for development of cross platform applications. Visual Studio tutorials C#. Create C# apps with Visual Studio. Get started How-To Guide Install Visual Studio; Get Started Start a guided tour.
Download Visual Studio for Mac and follow the on-screen instructions to install the software.
Just check the basic functions when installing, without selecting the platform specific components like Android / iOS / macOS.
C Sharp Download Mac Installer
Creating a new project
- Open Visual Studio for Mac, create a new project, and select .NET Standard Library.
- Select .NET Standard 2.0 for the .NET Core version and follow the instructions to create the project with the name “test”.
- Right click on
Dependencies
and chooseManage NuGet Package
. - Search for
neo.smart
and chooseNeo.SmartContract.Framework
, then clickAdd Packge
. - Write the following sample code in your Class1.cs file.
- In the menu choose
Build
->Build All
to compile the corresponding code.A test.dll file is created in the folderbin/Debug/netstandard2.0/
. Next we will use neon to compile it into a .avm smart contract file that can be deployed on the blockchain.
Downloading contract compiler
- Download neo-devpack-dotnet from GitHub.The master branch has been upgraded to Neo3 compiler, so you must switch the Git branch to
master-2.x
before downloading. - Run Visual Studio for Mac and open the solution neo-devpack-dotnet.sln. Right-click Neo.Compiler.MSIL and then select
Publish
. - Publish neon to the default path。After published, you can find neon.dll is generated under the path.
Compiling your smart contract to .avm
- Download and install .NET Core .
- Copy the new project file test.dll generated in previous steps into the directory where neon.dll locates in.
- Run Terminal, and use
cd
to go to the directory where neon.dll locates in. Enterdotnet neon.dll test.dll
to compile the .dll file into .avm.The output should look like this
C Sharp Download Mac
You should now find the
.avm
file in the test output folder.