System.IO.FileNotFoundException

harizon9's picture

Hi,

I have converted the C# Sample project to Visual Studio 2019. When I run the project I get the following error. Any idea?

System.IO.FileNotFoundException: 'Could not load file or assembly 'OCCTProxy.dll' or one of its dependencies. The specified module could not be found.'

Regards,
Hari

Niksoft's picture

System.IO.FileNotFoundException

I have a same problem. :-(

Felix

Niksoft's picture

System.IO.FileNotFoundException

I tried find all dependencies libs for OCCTProxy.dll via dumpbin /dependents.

I have all dlls in the root folder of my application, but still I have error message Could not load file or assembly 'OCCTProxy.dll

Windows 10 Pro - 20H2, Visual Studio 2019 Community

Please, do have anybody some idea?

Here is dumpbin /dependents result:

MSVCP140D.dll
TKernel.dll
TKBRep.dll
TKXSBase.dll
TKService.dll
VCRUNTIME140D.dll
ucrtbased.dll
KERNEL32.dll
TKV3d.dll
TKOpenGl.dll
TKIGES.dll
TKVRML.dll
TKMath.dll
TKSTEP.dll
TKSTL.dll
TKLCAF.dll
mscoree.dll

Felix

kgv's picture

Re: dependencies

Your list of dependencies looks incomplete (no freetype, for example) - probably the search has been done without recursion.

Niksoft's picture

System.IO.FileNotFoundException

Thanks for your answer. I tried copy all DLLs from \OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\win64\vc14\bin\ to my root application folder.
But result is same. Still I have same error .

Please, where can I find, list of dependecy DLLs for OCCTProxy?

I am testing WinForn C# original sample from OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\samples\CSharp\

Thanks.

Felix

kgv's picture

"OpenCASCADE-7.5.0-vc14-64\op

"OpenCASCADE-7.5.0-vc14-64\opencascade-7.5.0\win64\vc14\bin" contains only OCCT libraries, but OCCT itself depends on several other projects, which are placed in other folders. These are normally added to %PATH% variable by env.bat batch script, or should be copied to application folder.

Dependency Walker shows all dependencies - just need to check them recursively. The simplest way is, however, just starting a normal C++ application - system will show error with information about missing DLLs. Unfortunately, C# loader of DLLs is less verbose and leave user with unclear errors.

You may try putting CheckDLL64 to the place, where you've copied all DLLs to see which might be missing.

www.opencascade.com

Copyright 2011-2020
OPEN CASCADE SAS
Contact us