i cannot deploy my VB.NET application for automation of excel document. After I add new project for Setup Project and add the Project Output. A warning dialog box pop-up with the following message:
The following files may have dependencies that cannot be determined automatically.
Please confirm that all dependencies have been added to the project.
c:program filesmicrosoft officeoffice11excel.exe
c:program filesmicrosoft officemicroseft sharedoffice11mso.dll
does anyone know how can i solve this??
Replies (12)
Hi :Please post also the path to the location of your bin folder where the project files where deployed. I would use these paths to resolve the reference issues forInterop.Excel.DLLand Interop.Excel.ExeThanks
Hi,
Interop.Excel.DLL path is
C:Documents and SettingssssMy DocumentstempDirectoryInfobin
C:Documents and SettingssssMy DocumentstempDirectoryInfoobj
i didn't find a path for Interop.Excel.Exe
but there was
Excel.exe-13B3F319.PF IN c:windowsprefetch
Excel in c:program filesmicrosoft officeoffice11
Thank for your help
Place a copy of Interop.Excel.Dll in c:program filesmicrosoft officeoffice11
and let me know what happens?
Thanks
[quote user="rosemary"]Can anyone please help???[/quote]Rosemary:We are getting some help for you. One of our experts will be working with you on this very soon.Thanks
only a complete installation of Office 2003 will install the primary interop assemblies. On a custom installation you must add them manually.
Also make sure that in your project, if you go to references and chose Excel -> right click and Properties, in the Properties window Copy Local must be true
(which is also default value).
To install the primary interop assemblies you must follow these steps :
- In Control Panel, choose Add or Remove Programs.
- Select Microsoft Office in the Currently installed programs list.
- Click Change.
- Select Add or Remove Features, and then click Next.
- Select Choose advanced customization of applications, and then click Next.
- Expand Microsoft Excel for Windows, click the box next to .NET Programmability Support, and then click Run from My Computer.
- Expand Microsoft Word for Windows, click the box next to .NET Programmability Support, and then click Run from My Computer.
- Expand Office Tools, click the box next to Microsoft Forms 2.0 .NET Programmability Support, and then click Run from My Computer.
- Under Office Tools, expand Microsoft Graph, click the box next to .NET Programmability Support, and then click Run from My Computer.
- Follow the same procedure to install primary interop assemblies for any other Office applications you want.
- Click Update
Also this way you can check if they are already installed (this must be done on the machine you want to deploy your application).
[quote user="rosemary"]Hi,Thanks a lot i did all the steps you mentioned but i still face the same problem what should i do now??[/quote]Please take a look at these Microsoft / MSDN Links:Primary Interop Assemblies (PIAs)http://www.kdkeys.net/deploy-project-error-interop-excel-dll-and-interop-excel-exe/#link-7034Office Primary Interop Assemblies (PIAs)http://www.kdkeys.net/deploy-project-error-interop-excel-dll-and-interop-excel-exe/#link-7035Thanks
You are deploying an Office 2003 - Excel solution. Does the target computer(s) have Excel 2003 installed?
yes and where running the first form of the application works but then i get a msg:
An unhandeled error has occurred in your application. file or assemply name Interop.excel or one of its dependencies was not fount.
and the details are:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.IO.FileNotFoundException: File or assembly name Interop.Excel, or one of its dependencies, was not found.
File name: "Interop.Excel"
at DirDemo.Form1.Form1_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ContainerControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
=== Pre-bind state information ===
LOG: DisplayName = Interop.Excel, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = C:Documents and SettingssssDesktop
LOG: Initial PrivatePath = NULL
Calling assembly : DirDemo, Version=1.0.1791.38787, Culture=neutral, PublicKeyToken=null.
===
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Interop.Excel, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///C:/Documents and Settings/sss/Desktop/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/sss/Desktop/Interop.Excel/Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Documents and Settings/sss/Desktop/Interop.Excel.EXE.
LOG: Attempting download of new URL file:///C:/Documents and Settings/sss/Desktop/Interop.Excel/Interop.Excel.EXE.
************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
DirDemo
Assembly Version: 1.0.1791.38787
Win32 Version: 1.0.1791.38787
CodeBase: file:///C:/Documents%20and%20Settings/sss/Desktop/DirDemo.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase: file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.
Ask A Data Miner - 75,000+ Members
Follow On Twitter
Request More Information
.NET Framework is trying to locate the files:Interop.Excel.DLL andInterop.Excel.ExeThe interesting thing is that these two files were probably successfully deployed to your target computer.To confirm this search for both files on your target computer and please post the path where both files where installed by Windows Installer and thenI will post the solution.Thanks