Preparing your solution

Curtis Wensley edited this page Nov 14, 2014 · 5 revisions

Follow these steps to create a new application project for Eto.Forms.

Creating a new application

  1. Create a new console application in Visual Studio or Xamarin Studio.

    Note: Creating a console application is recommended as it'll add the least amount of extraneous dependencies that you do not need.

  2. Change the project type to Executable with GUI

    Xamarin Studio

    1. Right click on the project, select Options
    2. Go to Build > General
    3. Change Compile Target to "Executable with GUI"

    Visual Studio

    1. Right click on the project, select Properties
    2. In the Application pane, set Output Type to "Windows Application"
  3. Add a reference to Eto.dll to your project

    This can be done by adding the Eto.Forms nuget package.

    Note: You only need to reference System.dll. Any references to other GUI frameworks, like System.Windows.Forms should be removed.

Creating a library

Using a library to house all of your UI code is recommended, as it makes using it from both a MonoMac or Xamarin.Mac project (to create self-contained .app bundles for OS X), and a Windows/Linux application much easier. This is how the Eto.Test application is structured.

  1. Create a new library in Visual Studio or MonoDevelop

  2. Add a reference to Eto.dll to your project

  3. Reference your UI library from each of your application projects

Next Steps: Tutorial 1 Hello Eto.Forms