Installation

Introduction

The C#/.Net version of the OpenEye Toolkits is a P/Invoke wrapper created using SWIG. It is important to note that this is not a new version of the toolkits written in C# nor is it a C# interpretation of the toolkit API, but a rather faithful reproduction of the toolkit API in C#. And while this manual is specific to C#, the version of the toolkits works with all .Net languages include Visual Basic .Net, F# and IronPython.

A few of the idiomatic differences include:

  • There are relatively few classes in OEChem and they have a rather shallow inheritance hierarchy.
  • Most OEChem algorithms are in C++ free functions. These are mapped to static methods in the class OEChem.
  • C# doesn’t support all the operator overloading of C++, so some C++ operators are mapped to methods. For example, “operator bool()” is mapped to a member function called “IsValid()”, “operator()” is mapped to “Call()”.

Prerequisites

In order to use the OpenEye toolkits with C#/.Net, you need a copy of Visual Studio. We currently support VS2013 and VS2015, including the free “Express” versions.

Note

For deployment of toolkit programs built with VS2015 onto older systems, one may need to download and install the redistributable VS2015 runtime, available at: https://www.microsoft.com/en-us/download/details.aspx?id=48145 Otherwise one may get messages at execution-time about missing files: msvcp140.dll, vcruntime140.dll and related files.

Licensing

A license file from OpenEye Scientific Software is required to run any OpenEye toolkit. A license file can be requested/obtained by contacting OpenEye at sales@eyesopen.com.

At startup, the toolkit looks for a valid license in the following default locations:

  • In a file specified by the environment variable OE_LICENSE.

  • In a file named oe_license.txt in the directory specified by the environment variable OE_DIR.

  • In a file named oe_license.txt in the user’s platform-specific local OpenEye application data directory. The location of this directory is detailed below:

    • Microsoft Windows Vista/7/8.1/10:

      C:\Users\USERNAME\AppData\Local\OpenEye

  • In a file named oe_license.txt in the current working directory

Download the OpenEye .Net distribution

The distribution is obtained from http://www.eyesopen.com/downloads. Once you have a license file with the “clr” feature for the toolkits, you can download a distribution. There are both 32-bit and 64-bit downloads for each supported version of Visual Studio.

Installation

Each distribution is provided as ZIP file, that you can simply extract. Inside the C#-Examples folder, you will find a pair of folders for each toolkit. One for the main examples and one for the documentation examples. Each sub-folder contains a solution (.sln) file appropriate for your chosen Visual Studio version.

The Global Assembly Cache

If you desire to install all the OpenEye assemblies into the Global Assembly Cache, there is a convenience script included in the Scripts directory. Double-click on Install_to_GAC.bat to install all the assemblies.

If you need to uninstall the assemblies for some reason, simply double-click on Uninstall_from_GAC.bat.

Note

There is no requirement to install anything into the GAC. If you are not sure you need this, you probably don’t.