SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Error adding reference to dll: Solution tlbimp.exe

Last post 05-08-2008 10:41 AM by Joris3pinter. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 12-10-2007 3:51 PM

    Error adding reference to dll: Solution tlbimp.exe

    I am working on a SAP Business One interface, which requires SAPbobsCOM2007.dll. I can load this .dll into Visual Studio 2005 with no problem, everything loads and compiles without error. When I add the reference to the project in Sharp Develop, I get this error immediately, and if I try to compile the project, it acts as though the library is not loaded, and complains about every reference to the library. I do know this dll contains "special" UI code for VS.2005, which sets up a new toolbox inside the UI when it's loaded. Any suggestions or ways I can help the developers figure this one out would be great. Thanks.

     

    Error loading code-completion information for SAPbobsCOM from ?:
    Could not find assembly file.

    Building COM interop assembly...
    Build started.
    c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(0,0) : Warning MSB3287: Cannot load type library for reference "SAPbobsCOM". Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
    Build finished successfully.
    Error loading code-completion information for SAPbobsCOM from ?:
    Could not find assembly file.

  • 12-10-2007 10:27 PM In reply to

    Re: Error adding reference to dll

    The error suggests to me that the COM component is not registered.

    Is VS 2005 installed on the same machine? It is probably taking a look at the project file and comparing it with the one with created by SharpDevelop. VS tends to add dependent COM components to a project, but SharpDevelop does not currently have that functionality.

  • 12-11-2007 5:47 AM In reply to

    Re: Error adding reference to dll

     There definately are dependent COM components, but I'm not sure how to deal with them. I cannot run "regsrv32 SAPbobsCOM2007.dll" without 4 other files in the same directory (B1Zipper2007.dll, Int_Fields2007.dll, SchemaGenerator2007.dll, xerces-c_2_4_0.dll). I cannot regsrv32 any of these other 4 (Windows states: DllRegisterServer entry point was not found), so there is no way to add them to the References list. Am I looking at this the wrong way?

     Thanks for the help.
     

  • 12-12-2007 12:35 AM In reply to

    Re: Error adding reference to dll

    Can VS 2005 use the COM components on the same machine as SharpDevelop?

    What does VS 2005 show in the add reference dialog? 

    Compare what is in the VS 2005 project file with the project file produced by SharpDevelop. 

  • 12-12-2007 4:52 PM In reply to

    Re: Error adding reference to dll

    Note: I'm using VS 2003, my mistake in the first posting.

    Anyways, that means it's using VS2003/.net 1.1 and compiles/links fine under it. If it's some compatibility issue with .net 2.0, I can't get SharpDevelop to actually link references with version 1.1. When I change the Project->Project Options->Compiling->Target Framework to .Net 1.1, the error when I add the reference "c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(0,0) : Warning MSB3287" still shows it's using the .net 2.0 path.

     Also, the list of references in VS2003 and SD is exactly the same, but if I save the project in VS2003, and open it in SD, the reference to SAPbobsCOM is gone. Open it in VS2003 and it's there.

     

     I can get these .dll's to whomever can have a gander at them off-list. This would be great to fix SD.

      

  • 12-17-2007 2:45 PM In reply to

    Re: Error adding reference to dll

     I found a solution to SD's inability to load COM components properly. This solution came about because I needed to load this COM component into my .net websites, and you cannot reference COM components directly without building a project.

     I converted the COM component to a .NET assembly with tlbimp.exe. The location of this varies based on your .net version, but the one I used is in c:\Program Files\Microsoft.NET\SDK\v1.1\bin.

    example: tlbimp.exe c:\sapb1\sapbobscom2007.dll /out:c:\sapb1\SAPbobsCOM.dll

     Whatever you name the out file will be the name of the new .net assembly class. Remember that the case of the class name is important for non-VB projects.

    Load this into your project with "Add Reference -> .NET Assembly Browser"

    Good luck. 

  • 05-08-2008 10:41 AM In reply to

    Re: Error adding reference to dll: Solution tlbimp.exe

    darren,

    read your last post and tried TlbImp.exe on a active-x executable. TlbImp.exe does not work, wants a dll. suggestions? 

     Joris

Page 1 of 1 (7 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.