Could not load file or assembly 'Interop.RFCCONNECTORLib, Version=1.0.0.0,

I am trying to run/debug the GetFlights example
with Visual Basic 2005 Express Edition.
I get the following error message:

Could not load file or assembly 'Interop.RFCCONNECTORLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.


an interop wrapper is necessary

Hello,

since Rfc Connector is a COM component, you need a so called "Interop Assembly" to access it from .NET-languages (as VB 2005 EE). Since a primary interop assembly (PIA) is not shipped with the 1.0 release of Rfc Connector (but it will be in the next release, which will ship QII/2007), it is necessary to create a wrapper when calling Rfc Connector from .NET.

This is normally done automatically when importing the COM component in Visual Basic (just answer "yes" when asked if the IDE should generate this wrapper). From the error message given by you, it appears that you did not generate this wrapper. In that case, you can simply create a new project, add Rfc Connector to it and let the IDE generate it.

A more detailed description of the necessary steps can be found in this technical article on MSDN.

If this answer does not solve your problem, please reply to this thread and I will try to investigate the issue further.

with kind regards,
C. Vigelius
Rfc Connector Support

Importing Com components

Dear Mr. Vigelius,

I assume by importing you refer to menu path: Tools>>Choose Toolbox Items
and then the tab "Com Components".
When I use this I do not see the rfc connector.
Do I have to register it? I am using win 2003 server enterprise.

looks like an installation problem

Normally, the setup program should register the components correctly, so they should appear in the aforementioned tab. If they don't, then there is probably something wrong with the installation (did you install it using an account with administrator privileges?).

Easiest way to fix that is by using the regsvr32 tool:

- Log on to the computer with an account which has administrator privileges
- select "Start"->"Run" and type cmd.exe (this will open a command line window)
- in the command line, change into the directory where rfcconnector.dll is located
using the "cd" command (default location is C:\Program Files\RfcConnector\)
- type "regsvr32 rfcconnector.dll"
- now the components should be registered and should be available in "Components" tab

If that does not help, please contact me again (you can also contact me by e-mail : info(at)rfcconnector.com)

with kind regards,
C. Vigelius