Book a Demo

Author Topic: On adding reference gives error  (Read 5042 times)

vibhugupta

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
On adding reference gives error
« on: April 18, 2008, 08:26:04 pm »
I am trying to create an addin through c# .net code. When I go and add reference to
C:\Program Files\Sparx Systems\EA Trial\Interop.EA.dll

it gives error saying:

A reference to 'C:\Program Files\Sparx Systems\EA Trial\Interop.EA.dll ' could not be added. This is not a valid assembly or COM component. Only assemblies with extension 'dll' and COM components can be referenced. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

Please help me and tell the solution.

Vibhu

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: On adding reference gives error
« Reply #1 on: April 18, 2008, 09:32:05 pm »
It's EA.tlb that you need.

Interop.EA.dll is created by Visual Studio when you reference EA.tlb. Maybe you're working with an older version of .Net than the version which created the Interop.EA.dll in the Sparx folder. So just add a reference to EA.tlb and Visual Studio will create a suitable Interop.EA.dll for your project.

vibhugupta

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: On adding reference gives error
« Reply #2 on: April 18, 2008, 10:20:04 pm »
Interop.EA.dll is already there on the location
C:\Program Files\Sparx Systems\EA Trial that is when I installed EA trial version this dll is already there I am just adding the reference of this dll and it is giving error.

Actually the problem is that I already have an addin that was running fine on EA 6.1 but this addin is not working on EA 7.1 trial version. It shows addin enable when I check through Addins menu followed by manage addins but addin menu doesn't appear.

Vibhu

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: On adding reference gives error
« Reply #3 on: April 20, 2008, 10:04:29 pm »
I am assuming that the "it" that doesn't allow the reference is VS 2003...

For the new project, explicitly remove the reference to the Interop, then add the TLB (from the COM tab of the References dialog). See if you are allowed to make the reference.

David
No, you can't have it!

vibhugupta

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: On adding reference gives error
« Reply #4 on: April 21, 2008, 09:10:22 pm »
I tried the same it is still not appearing. Please suggest