Skip to content
Curtis Wensley edited this page Jun 25, 2020 · 19 revisions

The easiest way to get started with Eto.Forms is to use the Visual Studio or Xamarin Studio addins. These addins provide a way to create new Eto.Forms projects very easily, either with a single launcher or separate launchers per platform.

Visual Studio 2019

Make sure you have installed the latest Visual Studio updates. Then, install the extension by following these steps (or download here):

  1. Open Extensions > Manage Extensions
  2. Select Online > Visual Studio Marketplace
  3. In the search box, type Eto.Forms
  4. Select Eto.Forms Visual Studio Addin and click Download
  5. Restart Visual Studio to install the extension.

Now you can easily create a new project using the Eto.Forms Application template.

Visual Studio for Mac 8.6+

First, install the extension by following these steps:

  1. Download the latest Eto.Addin.MonoDevelop.mpack from here.
  2. Open Visual Studio > Extensions... (Mac)
  3. Click Install from file...
  4. Select the .mpack file and click Open
  5. Click Install to install the extension
  6. Restart Visual Studio for Mac

Now you can easily create a new project using the Multiplatform > App > Eto.Forms > Application template.

Note You must also install the latest version Xcode if you want to use the Xamarin.Mac platform.

dotnet new

With the .NET Core SDK installed, run the following from the command line:

> dotnet new -i "Eto.Forms.Templates::*"
> dotnet new etoapp --help  # shows project creation options
> mkdir MyApp
> cd MyApp
> dotnet new etoapp -m xaml  # create a project xaml definitions
> dotnet build MyApp.Mac/MyApp.Mac.csproj
> dotnet build MyApp.Wpf/MyApp.Wpf.csproj
> dotnet build MyApp.Gtk/MyApp.Gtk.csproj

Note you currently cannot build .NET Core based WPF or WinForms apps on non-windows platforms. Instead, you can build each of the .csproj's directly or create solution configurations for each platform.

VS Code

VS Code is a great alternative to using VS 2019 or VS for Mac and supports .NET Core and mono debugging.

For Eto.Mac targets, you need to set the "program" variable to the executable within the .app bundle, something like ${workspaceFolder}/MyApp.Mac/bin/Debug/netcoreapp3.1/MyApp.Mac.app/Contents/MacOS/MyApp.Mac