# 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, VS2015 and VS2017, 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.

Note

The following minimum versions of the VS2017 compiler(s) are recommended:

Microsoft Visual Studio Community 2017
Version 15.9.7
VisualStudio.15.Release/15.9.7+28307.423
Microsoft .NET Framework
Version 4.7.03190


or

Microsoft Visual Studio Professional 2017
Version 15.9.4
VisualStudio.15.Release/15.9.4+28307.222
Microsoft .NET Framework
Version 4.7.03062


## 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:

• Linux/UNIX:

• macOS:

• Microsoft Windows 7/8.1/10:

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

## 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.