Skip to content
Miepee edited this page Jan 18, 2022 · 20 revisions

The easiest way to get started with Eto.Forms is to use the Visual Studio extensions or dotnet new. These provide a way to create new Eto.Forms projects very easily, either with a single project or separate launcher projects 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.

For the Eto.Mac64 platform using .NET 5+, you need to set the startup program to the executable within the .app bundle, something like bin/Debug/net6.0/MyApp.Mac.app/Contents/MacOS/MyApp.Mac, which allows you to run from VS for Mac but not debug (a limitation of VS for Mac). To debug you can use net48 or use XamMac2 instead.

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/net6.0/MyApp.Mac.app/Contents/MacOS/MyApp.Mac

JetBrains Rider

JetBrains Rider is a great cross-platform alternative for Visual Studio.
With the .NET Core SDK installed, run the following from the command line: dotnet new -i "Eto.Forms.Templates::*"

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

For Eto.Mac targets, you need to set the startup program to the executable within the .app bundle, something like bin/Debug/net6.0/MyApp.Mac.app/Contents/MacOS/MyApp.Mac.

Clone this wiki locally