3

I am just starting out with Mono-GTK app development. I wanted to setup a appindicator icon in systray. But C# returns namespace is missing.

code: using AppIndicator;

returns error: The type of namespace name 'AppIndicator' could not be found.Are you missing directive or an assembly reference?

What to do?

Kunal Khatri
  • 55
  • 1
  • 5

2 Answers2

2

You need to do the following:

  1. sudo apt-get install libappindicator0.1-cil-dev

  2. Then add a reference to the library (see image below)

  3. Finally, include a reference to namespaces you need. Typically these will be the following:

    using AppIndicator;

    using Gtk;

    using System;

Edit References.

Thomas Bratt
  • 48,038
  • 36
  • 121
  • 139
1

Install dependencies:

sudo apt-get install libappindicator0.1-cil-dev

And then compile with

dmcs -pkg:gtk-sharp-2.0,appindicator-sharp-0.1 file.cs