473,498 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interop.Excel

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
4 8091
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1011
by: Le Thanh Thuan | last post by:
In my VB.Net project, I using Interop.Excel 11.0 (Excel 2003 I create Setup project in my computer, and then , I setup in another computer using Excel 2000 When I run my application, a error occur...
1
8405
by: Steve B. | last post by:
Why does Office create a compile error when doing a Release compile but not when doing a Debug complie. Release compile is compiled to the network share drive - Excel Interop is added as a...
2
12643
by: Alex D. | last post by:
Hi .I cant seem to find a way to authorize asp.net user to create an Excel application using this: Microsoft.Office.Interop.Excel.ApplicationClass excel = new...
3
5104
by: Brent | last post by:
I'm trying to open and manipulate an Excel spreadsheet from C#. To that end, I've referenced Interop.EXCEL9.dll, which I have on my machine. All of the examples I've read say to do something like...
1
1923
by: Geoff | last post by:
Hello I am having an issue with my code below not closing EXCEL.EXE when I tell it do. Any help would be appreciated. ----- Dim excel As Microsoft.Office.Interop.Excel.Application Dim wb...
0
4089
by: Bill Fallon | last post by:
I am developing a VB.Net application with VS 2005 that opens an Excel workbook and populates the worksheet with data. I started developing the application with Office 2007 installed on my Vista...
2
8320
by: GS | last post by:
I have installed the ms PIA for ofc XP, and followed the article http://support.microsoft.com/kb/247412/ trying to paste into a worksheet However I got late binding not allowed errors .......
0
1302
by: Michel Walsh | last post by:
I got the following error: ============= Type mismatch. (Exception from HRESULT: 0x80020005 (DISP_E_TYPEMISMATCH)) ============= when using Interop.Excel.Run. The relevant code is from...
5
1890
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I've been tasked to translate a C# program to VB. (Dot Net 2.0.) I'm starting from scratch with no documentation and I'm trying to understand what the original programmer did. (The 'original...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7205
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.