[.NET]TypeLoadException

The engine.
Post Reply
klkim
Posts: 6
Joined: Fri May 02, 2008 3:28 pm

[.NET]TypeLoadException

Post by klkim »

Hi, all

Using SMILE.NET, after importing smilenet.dll in Visual Studio 2005 reference, build is OK.

But when I run a code, there is TypeLoadException in this line "Smile.Network net = new Smile.Network();".

Is it necessary to use P/Invoke technology or [DllImport ...]?

Thank you in advance.

Best Regards,
klkim
klkim
Posts: 6
Joined: Fri May 02, 2008 3:28 pm

Post by klkim »

If the cause of above problem is based on different compiler (because I am using visual studio 2005, but I think the smilenet.dll is made on visual studio 2003 right??), the only solution is to rebuild smilenet.dll in my development environment?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

I can create console or WinForms app in VS 2005, add the reference to Smile.NET (the public binaries, compiled with VS 2003 and available on our download page) and run the program which creates Smile.Network object and calls its methods.

What's the type of your project? Is it a webforms app?
klkim
Posts: 6
Joined: Fri May 02, 2008 3:28 pm

Post by klkim »

The type of my project is Windows Application Program in VS2005 project template.
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

klkim wrote:The type of my project is Windows Application Program in VS2005 project template.
Can you zip the sources of your project and post it here, so I can try to reproduce the problem?
klkim
Posts: 6
Joined: Fri May 02, 2008 3:28 pm

Post by klkim »

I have confused the namespace of the project. :(
Now, I solved the exception problem.

Thank you very much, shooltz.
Post Reply