473,806 Members | 2,653 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 8104
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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:AC******** *************** ***********@mic rosoft.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\Ex cel\bin\Release \Interop.Excel. dll
/keyfile:"\\nlde v\DotNet Deployment\Prod \SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\E xcel\bin\Releas e\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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:AC******** *************** ***********@mic rosoft.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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:D6******** *************** ***********@mic rosoft.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\Ex cel\bin\Release \Interop.Excel. dll
/keyfile:"\\nlde v\DotNet Deployment\Prod \SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\E xcel\bin\Releas e\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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:AC******** *************** ***********@mic rosoft.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:"\\nlde v\DotNet Deployment\Prod \SoftDev.snk" /out:SoftDevExce l.dll

I get:
TlbImp error: System.IO.IOExc eption - 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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:D6******** *************** ***********@mic rosoft.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\Ex cel\bin\Release \Interop.Excel. dll
/keyfile:"\\nlde v\DotNet Deployment\Prod \SoftDev.snk"

I get the following error:
TlbImp error: The input file
'C:\Dev\Excel\E xcel\bin\Releas e\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.co m

"Robert" <rh******@hotma il.com> wrote in message
news:AC******** *************** ***********@mic rosoft.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 File or assembly name Interop.Excel, or one of its dependencies, was not found. File name"Interop.Excel"
1
8422
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 reference in the VS Project window. - Excel PIA Interop is located on the same network location as the exe and the share directory with PIA is included in the project path - Other projects in the same solution also reference Office with no problem ...
2
12679
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 Microsoft.Office.Interop.Excel.ApplicationClass(); I keep getting this error: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed with HRESULT: 0x80070005(Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)))....
3
5113
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 this: -------------------------- Excel.Application xl = new Excel.ApplicationClass(); xl.Visible = "true"; String workbookPath = @"c:\SomeWorkBook.xls"; Excel.Workbook xlW = xlW.Workbooks.Open(workbookPath,0, false, 5, "",
1
1943
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 As Microsoft.Office.Interop.Excel.Workbook Dim ws As Microsoft.Office.Interop.Excel.Worksheet
0
4137
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 OS, but after I discovered that it won't run on a system with Office 2003, I uninstalled Office 2007 and installed Office 2003. I reset the reference in .Net to the Microsoft Excel 11.0 Object Library. The application works fine from the ..Net...
2
8352
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 .... webOCWraooer,Copy // get the desired data into clapboard
0
1322
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 "Microsoft .Net Development for Microsoft Office": =============================== using System;
5
1907
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 programmer' is conveniently off on vacation so I can't ask him.) The program deals in some way with Excel spreadsheets. There is a line of code in the program: CurSheet =...
0
9719
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9598
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10623
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10373
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7650
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.