mobigital

Excel loads the vsto application and customization assemly.

The XLS and DLL are deployed locally in the same folder.

When I run some functions of the VSTO application - particularly where it opens the database connection (via Sybase ASE Client), it crashes excel with the following error logged into event viewer:

EventType clr20r3, P1 excel.exe, P2 11.0.8105.0, P3 44ed0d35, P4 mscorlib, P5 2.0.0.0, P6 4333ab80, P7 3aef, P8 ae, P9 system.io.fileloadexception, P10 NIL.

Also when I delpoy the assembly via http, the IIS log shows that Excel is trying to load the .resources assembly but is not able to:

23:19:39 161.15.204.77 GET /vsto/MyAssembly.dll.config 200
23:19:39 161.15.204.77 GET /vsto/en-US/MyAssembly.resources.DLL 404
23:19:39 161.15.204.77 GET /vsto/en-US/MyAssembly.resources 404
23:19:39 161.15.204.77 GET /vsto/en-US/MyAssembly.resources.EXE 404
23:19:39 161.15.204.77 GET /vsto/en-US/MyAssembly.resources 404
23:19:40 161.15.204.77 GET /vsto/en/MyAssembly.resources.DLL 404
23:19:40 161.15.204.77 GET /vsto/en/MyAssembly.resources 404
23:19:40 161.15.204.77 GET /vsto/en/MyAssembly.resources.EXE 404
23:19:40 161.15.204.77 GET /vsto/en/MyAssembly.resources 404
23:19:43 161.15.204.77 GET /vsto/MyAssembly.dll.config 200

This workstation has both VSTO Runtime and Office PIAs installed. It actually used to be able to run a simpler VSTO application, before I made it more complex.



Re: Visual Studio Tools for Office excel crashes with system.io.fileloadexception when running vsto application

mobigital

This application uses Sybase.Data.AseClient.DLL.

This DLL has some native dependencies - a bunch of DLLs which it calls via P/Invoke I think.

I removed the Sybase.Data.AseClient.DLL from the deployment directory, then ran XLS again, clicked the function which goes to database, and it crashed again, but this time I found these messages in the IIS Log:

23:50:27 161.15.204.77 GET /vsto/Sybase.Data.AseClient.DLL 404
23:50:27 161.15.204.77 GET /vsto/Sybase.Data.AseClient/Sybase.Data.AseClient.DLL 404
23:50:27 161.15.204.77 GET /vsto/Sybase.Data.AseClient.EXE 404
23:50:27 161.15.204.77 GET /vsto/Sybase.Data.AseClient/Sybase.Data.AseClient.EXE 404

Also after that the .NET Runtime crash error changed from system.io.fileloadexception to: system.io.filenotfoundexception

EventType clr20r3, P1 excel.exe, P2 11.0.8105.0, P3 44ed0d35, P4 mscorlib, P5 2.0.0.0, P6 4333ab80, P7 122f, P8 25, P9 system.io.filenotfoundexception, P10 NIL.

so I am thinking the problem is with loading the Sybase ASE client.

Can anyone point at how to deploy an application which has native dependencies. (These DLLs do not require registration, but have to be located in the same folder as parent managed assembly - Sybase.Data.AseClient.DLL).

 





Re: Visual Studio Tools for Office excel crashes with system.io.fileloadexception when running vsto application

Geoff Darst - MSFT

Hi,

Native dlls are located by the loader.  The search order is documented here: http://msdn.microsoft.com/library/default.asp url=/library/en-us/dllproc/base/dynamic-link_library_search_order.asp.  You will need to make sure the dependent dlls are located in one of the places that the loader will be looking (or add the location to the PATH).

Sincerely,

Geoff Darst

Microsoft VSTO Team





Re: Visual Studio Tools for Office excel crashes with system.io.fileloadexception when running vsto application

mobigital

ok, but how do I ensure that loader brings the dependent DLLs from the HTTP location where customization assembly is deployed





Re: Visual Studio Tools for Office excel crashes with system.io.fileloadexception when running vsto application

Geoff Darst - MSFT

At the moment, we only support updating the customization assembly itself via the manifests. If you have dependencies, then you would need to create a setup project that would need to be run on the client side. You might want to refer to Misha's excellent blog on deployment--he's included walkthroughs on how to create setup projects. You can find it here: http://blogs.msdn.com/mshneer/archive/2006/01/05/deployment_articles.aspx.

Sincerely,

Geoff Darst

Microsoft VSTO Team