By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,876 Members | 1,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,876 IT Pros & Developers. It's quick & easy.

Interop.Excel

P: n/a
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?
--
Robert Hill

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:AC**********************************@microsof t.com...
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?
--
Robert Hill

Nov 17 '05 #2

P: n/a
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:AC**********************************@microsof t.com...
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?
--
Robert Hill


Nov 17 '05 #3

P: n/a
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:D6**********************************@microsof t.com...
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:AC**********************************@microsof t.com...
>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?
> --
> Robert Hill
>


Nov 17 '05 #4

P: n/a
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:D6**********************************@microsof t.com...
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 [.NET/C# MVP]" wrote:
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]
- mv*@spam.guard.caspershouse.com

"Robert" <rh******@hotmail.com> wrote in message
news:AC**********************************@microsof t.com...
>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?
> --
> Robert Hill
>


Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.