Interop.Excel

G

Guest

I have created a .dll in C# which has a reference to Excel. When I add a
strong name to the .dll in the AssemblyInfo.cs and try to rebuild, I get the
following error:

Assembly generation failed -- Referenced assembly 'Interop.Excel' does not
have a strong name

How can this be resolved?
 
N

Nicholas Paldino [.NET/C# MVP]

Robert,

What you will have to do is create the interop dll through the command
line tool TLBIMP. It will allow you to specify a strong name which you can
use to sign the interop assembly.

Hope this helps.
 
G

Guest

Thanks.
I looked up TLBIMP and am trying to get the syntax correct. This is what I
typed in at the command prompt:

tlbimp C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll
/keyfile:"\\nldev\DotNet Deployment\Prod\SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll' is not a valid type library

Is it syntax?

--
Robert Hill



Nicholas Paldino said:
Robert,

What you will have to do is create the interop dll through the command
line tool TLBIMP. It will allow you to specify a strong name which you can
use to sign the interop assembly.

Hope this helps.
 
N

Nicholas Paldino [.NET/C# MVP]

Robert,

You don't run TLBIMP on the interop dll, you run TLBIMP on the type
library of the COM server that you want to produce the interop library for.
TLBIMP will produce a DLL which you then set a reference to in your program.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Robert said:
Thanks.
I looked up TLBIMP and am trying to get the syntax correct. This is what
I
typed in at the command prompt:

tlbimp C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll
/keyfile:"\\nldev\DotNet Deployment\Prod\SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll' is not a valid type
library

Is it syntax?

--
Robert Hill



Nicholas Paldino said:
Robert,

What you will have to do is create the interop dll through the
command
line tool TLBIMP. It will allow you to specify a strong name which you
can
use to sign the interop assembly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Robert said:
I have created a .dll in C# which has a reference to Excel. When I add
a
strong name to the .dll in the AssemblyInfo.cs and try to rebuild, I
get
the
following error:

Assembly generation failed -- Referenced assembly 'Interop.Excel' does
not
have a strong name

How can this be resolved?
 
G

Guest

Okay. I have done some more digging and reading and have come up with the
following:

TlbImp "C:\Program Files\Microsoft Office\Office11\XL5EN32.OLB"
/keyfile:"\\nldev\DotNet Deployment\Prod\SoftDev.snk" /out:SoftDevExcel.dll

I get:
TlbImp error: System.IO.IOException - Access denied.

I think I have the correct file and I am administrator on this machine.
Any suggestions?
Thanks!
--
Robert Hill



Nicholas Paldino said:
Robert,

You don't run TLBIMP on the interop dll, you run TLBIMP on the type
library of the COM server that you want to produce the interop library for.
TLBIMP will produce a DLL which you then set a reference to in your program.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Robert said:
Thanks.
I looked up TLBIMP and am trying to get the syntax correct. This is what
I
typed in at the command prompt:

tlbimp C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll
/keyfile:"\\nldev\DotNet Deployment\Prod\SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\Excel\bin\Release\Interop.Excel.dll' is not a valid type
library

Is it syntax?

--
Robert Hill



Nicholas Paldino said:
Robert,

What you will have to do is create the interop dll through the
command
line tool TLBIMP. It will allow you to specify a strong name which you
can
use to sign the interop assembly.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I have created a .dll in C# which has a reference to Excel. When I add
a
strong name to the .dll in the AssemblyInfo.cs and try to rebuild, I
get
the
following error:

Assembly generation failed -- Referenced assembly 'Interop.Excel' does
not
have a strong name

How can this be resolved?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top