Assembly Hierarchy |
This document explains the hierarchy of all assemblies involved with the Grasshopper® plug-in. This is important for component developers so they know which Assembly References they need to have in order to compile a Grasshopper Component Library. It also provides some background information which is useful when communicating with other developers.
Grasshopper is a DotNET plug-in for Rhinoceros® 4.0 SR7 and later. It was written using Microsoft® Visual Studio® 2008 Professional using both VB.NET and C# source compiled against the DotNET 2.0 Framework. It is recommended, though not required, that you target the same framework when developing Grasshopper Component Libraries.
Our aim is to keep Grasshopper dependencies as conservative as possible. However, it is possible that we will switch to a higher version number of Rhino or DotNET if this new version fixes crucial bugs or exposes useful functions.
In order to inter-operate with the Rhino C++ SDK, Grasshopper uses the RhinoCommon.dll wrapper SDK which is being developed for both Rhino5 and RhinoMac. Grasshopper uses a special build of this SDK in order to run on Rhino4.
The Grasshopper project type is Class Library, meaning it cannot be run as a stand-alone application. Grasshopper.dll is loaded by a Rhino plugin called GrasshopperPlugin.rhp. This was done so we could provide support for Rhino4 and RhinoMac, without the need to resort to different builds of Grasshopper.dll.
As a Class Library, Grasshopper references namespaces in addition to RhinoCommon.dll, some of these are standard namespaces provided by the DotNET Framework, others are 3rd party assemblies and others still are written by McNeel developers but are shipped separately for technical reasons. Some of these assemblies need to be referenced by Component developers, while others can be safely ignored. The following table lists all assemblies referenced by Grasshopper.dll:
Assembly | Author | Purpose | Required |
---|---|---|---|
RhinoCommon.dll | Robert McNeel & Associates | Rhinoceros 5.0 DotNET SDK | |
GH_IO.dll | Robert McNeel & Associates | Grasshopper Input/Output library required to read and write Grasshopper files. | |
GH_Util.dll | Robert McNeel & Associates | Grasshopper utility library containing some peripheral algorithms. | |
QWhale.*.dll 1 | Quantum Whale | Syntax highlighter functionality. | |
System | Microsoft | Base DotNET Namespace. | |
System.Drawing | Microsoft | DotNET namespace involved with drawing shapes and text. | |
System.Windows.Forms | Microsoft | DotNET namespace involved with dialogs and controls. | |
System.Collections.Generic | Microsoft | DotNET namespace containing useful list classes. |
1 The QWhale product contains a total of 5 dlls.