NuGet package is available at https://www.nuget.org/packages/RDKit.DotNetWrap/.
Example code is in RDKit2DotNet.Example directory.
Newest NuGet package was built using the following versions.
- RDKit Release_2019.09.1
- Boost 1.70.0
- Eigen 3.3.7
- zlib 1.2.11
- Python 3.6.8
- CMAKE 3.15.5
- SWIG 4.0.1
- NuGet 5.3.1
- Visual Studio 2017
- Use Windows 10 (x64).
- Install Visual Studio 2017 enabling C++ and C#.
- Install CMAKE and add the directory to PATH.
- Install Python into default folder enabling pip using offical installer. If you build for x86, Python for 32-bit is also required to install.
- Download the following source codes and extract them into each directory.
- Customize
custom-dir.batfile according to where above dependencies are installed. - Set
PYTHONVERSIONvariable like the following if you specify Python's version.set PYTHONVERSION=Python36
- Install SWIG, ie, extract SWIG distributalbe and add the directory to PATH if you build for .NET Framework.
- Open 'Developer Command Prompt for VS 2017'.
- Execute
build-rdkit-python.bat. set BUILDPLATFORM=x86before execution above if you build for 32-bit. (32-bit build fails several python tests.)
- Install Python both x86 and x64 version. They are assumed to be installed in default folder, ie,
%LOCALAPPDATA%\Programs\Python\Python##-32and%LOCALAPPDATA%\Programs\Python\Python##. - Open 'Developer Command Prompt for VS 2017'.
- Execute
build-csharp-all.bat.- Procedure to build them step by step is described below.
- Open 'Developer Command Prompt for VS 2017'.
- Execute
set BUILDPLATFORM=x64orset BUILDPLATFORM=x86. - Execute
set-envs.bat. - Execute
make-zlib.bat. - Execute
make-boost.bat. - Execute
python build-rdkit-csharp.py. - Close 'Developer Command Prompt for VS 2017'.
- C# project file is created in
(RDKit-directory)/Code/JavaWrappers/csharp_wrapper/RDKit2DotNet.csproj. - Modify the project's codes or customize
build-rdkit-csharp.pyif required. - To execute
RDKit2DotNet.dll, do the followings.- Add the directory containing Boost DLLs built in
make-boost.battoPath, or copy all Boost DLLs into the same directory ofRDKFuncs.dll. - Set environmental variable
RDBASEproper value if necessary.
- Add the directory containing Boost DLLs built in
- Build assemblies for both x64 and x86 according to above procedure.
- Execute
set-envs.bat. - Execute
build-nuget-csharp.py. - NuGet package is created as
(RDKit-directory)/Code/JavaWrappers/csharp_wrapper/RDKit.DotNetWrap.#.#.#.nupkg.