EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Could not load file or assembly 'CBFSNet.dll' or one of its dependenci

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#21258
Posted: 08/30/2012 05:13:16
by Christopher Lenz (Basic support level)
Joined: 07/25/2012
Posts: 16

Hello,

on some Windows 7 32Bit machines I get this error
Code
Could not load file or assembly 'CBFSNet.dll' or one of its dependencies.


the CBFSNet.dll is placed in the same directory. driver is not installed.
The exception is thrown while calling:
Code
CallbackFileSystem.Install(dlgOpenDrv.FileName, AppEnvironment.Instance.OsEcmToFilesystem.mGuid, true,
                                                                    CallbackFileSystem.CBFS_MODULE_DRIVER | CallbackFileSystem.CBFS_MODULE_MOUNT_NOTIFIER_DLL |
                                                                    CallbackFileSystem.CBFS_MODULE_NET_REDIRECTOR_DLL, ref Reboot);


The same error is thrown in the sample apps provided with the eldos install.

On the most machines I have no problem. Even if the driver is not installed.
#21259
Posted: 08/30/2012 05:15:52
by Eugene Mayevski (EldoS Corp.)

You need MSVC runtime to be installed.

From the help file:

Quote

User-mode API

Callback File System user-mode API is shipped as .NET assemblies, static library for Visual C++ and VCL units.

.NET API:
When deploying the project, copy the CBFSNet.dll below to your application folder. Questions about when and how to install the assemblies to Global Assembly Cache are discussed in Working with Assemblies and the Global Assembly Cache and How to: Install an Assembly into the Global Assembly Cache articles.

.NET 4.0 assemblies are different for 32-bit and 64-bit platforms. 64-bit .NET 4.0 assemblies are available for x64 (AMD64) processor architecture used by most modern 64-bit processors and IA64 (Itanium) processor architecture used by some Intel-produced server processors.
All .NET 4.0 assemblies require Visual C++ 2010 Multithreaded Runtime DLLs (msvcm100.dll and msvcr100.dll). It's a good idea to include these DLLs into the distribution. The DLLs are located in <CBFS>\MSVC_REDIST\NET_40 folder.
If you place the assembly to the same folder where your application is located, these DLLs must be placed in this folder too. If you install the .NET assembly to the GAC, it's recommended that you also install the above DLLs to \Windows\System32 folder.

.NET 2.0 assemblies are different for 32-bit and 64-bit platforms. 64-bit .NET 2.0 assemblies are available for x64 (AMD64) processor architecture used by most modern 64-bit processors and IA64 (Itanium) processor architecture used by some Intel-produced server processors.
.NET 2.0 assemblies for Win32 and x64 platforms require Visual C++ 2005 SP1 Multithreaded Runtime DLLs (msvcm80.dll and msvcr80.dll). .NET 2.0 assemblies for IA64 platform require Visual C++ 2008 Multithreaded Runtime DLLs (msvcm90.dll and msvcr90.dll). It's a good idea to include these DLLs into the distribution. The DLLs are located in <CBFS>\MSVC_REDIST\NET_20 folder.
If you place the assembly to the same folder where your application is located, these DLLs must be placed in this folder too. If you install the .NET assembly to the GAC, it's recommended that you also install the above DLLs to \Windows\System32 folder.


Sincerely yours
Eugene Mayevski
#21270
Posted: 08/30/2012 09:45:36
by Christopher Lenz (Basic support level)
Joined: 07/25/2012
Posts: 16

I copied following dlls to my application:
CBFSNet.dll
cbfsinst.dll
msvcr100.dll
msvcp100.dll

of course ervertime the x86 dll. my app is x86 too
#21272
Posted: 08/30/2012 09:51:44
by Eugene Mayevski (EldoS Corp.)

If I understand you right, you have CBFSNet.dll and (msvcr100.dll + msvcp100.dll ) placed to your application and the loader still complains.

There are two things to check and ensure:
1) ensure that you take those MSVC DLLs that we include with CBFS. The problem is that Microsoft updates them with service packs and despite the name DLLs can be different.
2) put those DLLs to Windows system folder.

If this doesn't work, download Process Monitor and use it to find out, what DLLs are being searched for when you call CBFS .NET methods (first call to which will load the assembly and its dependencies).


Sincerely yours
Eugene Mayevski

Reply

Statistics

Topic viewed 1762 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!