[Gtk-sharp-list] how to add a gtk# reference in Visual Studio?
d.moonfire at mfgames.com
Sun Mar 9 23:52:43 UTC 2014
On Sun, Mar 9, 2014 at 3:16 PM, Grant Birchmeier <grant at grantb.net> wrote:
> Does anyone know how to get all the necessary mono-3.2.3/gtksharp-2.12.11
> libraries installed in a proper Windows way such that Visual Studio can see
For my projects, I've always used the browse button to go to the
installation folder and add the Gtk libraries. At my job, we do that for
even the "proper" Windows assemblies from third parties (Infragistics,
Nevron, NUnit) mainly because of policy of our staff.
When I was more involved with Mono/Gtk#, I remember a discussion about why
it is done that way. One was philosophy: the GAC is a great place for the
runtime to find DLLs, but not always a great place to code. That is why
Mono on Linux doesn't automatically look up assemblies in the GAC and
insists on using `pkgconfig` or direct path references. As such, my last
two jobs both had that same philosophy so that doesn't bother me.
The DLLs that you can't add via the GAC are usually p/invoked by the ones
that do, so just copy those into your bin directory and you are usually
good to go. Again, this is usually the case when I'm using p/invoke
libraries (Objective Grid for example).
Now, what *may* work for you is to use a NuGet package for Gtk. As far as I
know, there isn't an official one, but i did make a temporary one for the
Gtk 2.12 stuff mainly because I was doing a lot of little projects in
Visual Studio and I got tired of adding references (plus I wanted to learn
NuGet). Not entirely sure how far it will get you, but it worked well
enough for my needs.
The packages in question are Gtk, Mono.Cairo, and Mono.Posix.
At the moment, I'm not doing Gtk# programming because of secondary projects
(writing a novel and I have child being born in five weeks), but it *may*
get you down a different path that is easier. Then again, it may not.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Gtk-sharp-list