|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Broken ReferencesI created an Excel Automation Windows Application (VB.Net 2003) and it
works on the development machine fine. However when I run it on another machine I get this error: System.IO.FileNotFoundException: File or assembly name Microsoft.Office.Interop.Excel, or one of its dependencies, was not found. File name: "Microsoft.Office.Interop.Excel" Both machines have Excel 2003 installed, and I have a reference set to Excel 11.0.
Show quote
Hide quote
"Bill Schanks" <wscha***@gmail.com> schrieb Is the file mentioned there?> I created an Excel Automation Windows Application (VB.Net 2003) and > it works on the development machine fine. > > However when I run it on another machine I get this error: > > System.IO.FileNotFoundException: File or assembly name > Microsoft.Office.Interop.Excel, or one of its dependencies, was not > found. > > File name: "Microsoft.Office.Interop.Excel" > > Both machines have Excel 2003 installed, and I have a reference set > to Excel 11.0. I've never done it and didn't read it completely, but this might help: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_oxppias.asp If not, search for "PIA" (primary interop assemblies) and "deploy". Armin It seems like too much to have the end users having to install the PIA.
In my project I don't have 'Imports Microsoft.Office.Core'. I just have a reference set to Excel 11.0. I will add it to see if that solves the problem. What started me on this project was some sample code from MS on excel automation. In there the code was: dim xlApp as new excel.application I had to make it: dim xlApp as new Microsoft.Office.Interop.Excel.Application(). Shouldn't excel.application work? I'm fine using the fully qualified name it just seems like sample code should work once the references are correctly set. "Bill Schanks" <wscha***@gmail.com> schrieb You're using them in the project, thus you will need them. (maybe there are> It seems like too much to have the end users having to install the > PIA. exceptions I haven't heard of (see microsoft.public.dotnet.framework.interop)) > In my project I don't have 'Imports Microsoft.Office.Core'. I just Importing a namespace doesn't solve it. It only saves you from typing the> have a reference set to Excel 11.0. I will add it to see if that > solves the problem. full qualified name in the code. > What started me on this project was some sample code from MS on If you import Microsoft.Office.Interop at project level or file level, you> excel automation. In there the code was: > > dim xlApp as new excel.application > > I had to make it: > > dim xlApp as new Microsoft.Office.Interop.Excel.Application(). > > Shouldn't excel.application work? I'm fine using the fully qualified > name it just seems like sample code should work once the references > are correctly set. don't have to type the FQN. That's what they probably assumed in the sample code. Armin "Bill Schanks" wrote in message
Show quoteHide quote >I created an Excel Automation Windows Application (VB.Net 2003) and it Bill,> works on the development machine fine. > > However when I run it on another machine I get this error: > > System.IO.FileNotFoundException: File or assembly name > Microsoft.Office.Interop.Excel, or one of its dependencies, was not > found. > > File name: "Microsoft.Office.Interop.Excel" > > Both machines have Excel 2003 installed, and I have a reference set to > Excel 11.0. > I think you just need to put the file interop.excel.dll in the same folder with your executable. That's probably the file that is missing. You can rewrite the program to use late binding and then it wouldn't be necessary. Stan -- Stan Smith ADS Programming Services Birmingham, AL 205-222-1661 ssmith_at_adsprogramming.com "Stan Smith" <ssm***@adsprogramming.com> schrieb He doesn't want to install the interop PIA. ("It seems like too much to have > I think you just need to put the file interop.excel.dll in the same > folder with your executable. That's probably the file that is > missing. the end users having to install the PIA.") I wrote that this is necessary to run the app. Armin Thanks everyone for the help, sorry for the noob questions. I am maily
a vba programmer and I am making the switch to vb.net so I can write stand alone apps. I created an installer and it copies the proper .dll files. There is no need to install the PIA's if the proper .dll file is in the same directory as the application. Thanks again for the guidance.
check point inside "cirkle" (basketball)
Exposing properties of a class within a class Unresponsive UI during lengthy operation ? Invoking a PictureBox click ? Count lines in multi-line textbox Can't Figure Out Correct Syntax Using a Structure in a Class MethodInfo or MethodBase? Problems with Excel Object Library console.write |
|||||||||||||||||||||||