We need more details to help diagnose the problem. The best place to do
this is over in our issue tracker at http://github.com/openbabel/issues.
We'll need to know exactly what you did step by step, starting with what
exactly did you download, etc.

The problem could be anything unfortunately. This error message is
triggered by any mismatch of the .NET and native code. For example, you may
have used the 32-bit .NET dll with the .64 bit native dll. You may have an
old version of Open Babel installed, and there was a mismatch there. Etc,
etc. If you can take us through the steps one by one, we should be able to
get to the bottom of this.

We don't obfuscate anything, at least not intentionally. If there's
something amiss, let us know.

- Noel


On 4 June 2018 at 13:35, Leif Peterson <leifepeter...@sbcglobal.net> wrote:

> 1.       I loaded all the .dlls in the executable folder, and also
> Reference the OBDotNet.dll in the VS 2015 (C#) within the project, and am
> getting an exception
>
>
>
> Additional information: The type initializer for 
> 'OpenBabel.openbabel_csharpPINVOKE'
> threw an exception.
>
>
>
> Example code is below:
>
>
>
> using System;
>
> using System.Collections.Generic;
>
> using System.Linq;
>
> using System.Threading.Tasks;
>
> using System.Windows.Forms;
>
> using OpenBabel;
>
>
>
>
>
> namespace MyConsoleApplication
>
> {
>
>     class Program
>
>     {
>
>         static void Main(string[] args)
>
>         {
>
>             OBConversion obconv = new OBConversion(); * //**ß** Exception
> thrown here.*
>
>             obconv.SetInFormat("smi");
>
>             OBMol mol = new OBMol();
>
>             obconv.ReadString(mol, "CCC");
>
>             double mowwt = mol.GetMolWt();
>
>             var smowwt = mowwt.ToString();
>
>             MessageBox.Show(smowwt);
>
>         }
>
>     }
>
> }
>
>
>
> 2.       It seems that the .dlls are obfuscated as well, so how open is
> OpenBabel?
>
>
>
> LP
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to