ExcelDna
ExcelDna copied to clipboard
Error message: "Attempting to load MY-ADDIN.RESOURCES.EN-US from resources."
One of the users is getting a number of error messages like above from Excel-Dna, and then Excel crashes. I wonder what may be the reason of such behavior?
@fandrei The message is coming from AssemblyManager
around line 90 and may not necessarily what's causing Excel to crash...
From the source code:
We expect failures when loading .resources assemblies, so only log at the Verbose level.
From: http://blogs.msdn.com/b/suzcook/archive/2003/05/29/57120.aspx
"Note: Unless you are explicitly debugging the failure of a resource to load,
you will likely want to ignore failures to find assemblies with the ".resources" extension
with the culture set to something other than "neutral". Those are expected failures when the
ResourceManager is probing for satellite assemblies."
Are you able to put together a sample add-in that reproduces the error?
@augustoproiete I can't even reproduce it on my PC, it's only happening to some users. I'm not sure what other reasons can make it crash, but this is the only clue that I currently have. Any ideas how to diagnose it, besides this log?
@fandrei Off the top of my head, I would suggest the following (in any order you think is best):
-
Check the problematic user's Regional Settings on Windows, Windows install language, Excel language, etc. to see if there's a pattern somewhere
-
Check if you have any culture settings defined on your assemblies, resource files, satellite assemblies, and try removing them (for testing purposes)
-
Build a simple add-in with a "hello world" function, and a simple "hello world" ribbon, etc... i.e. A very simplified add-in, and prove that it runs on the problematic users' machine, so if it crashes too, you know it's a problem with their Excel install, and not your add-in
-
Put a
try...catch
everywhere to prevent any exception from bubbling up to excel, and log any exceptions you catch... i.e.AutoOpen
&AutoClose
, all Ribbon callback methods, any function handler... -
Add logging everywhere, so you can trace the code that is being executed and perhaps help you identify when it stops
-
Catch all unhandled exceptions and log them and/or display them in a message box so you can catch hidden exception that might be happening
@augustoproiete ok thanks, will try the ones that I haven't tried yet.
@fandrei Any news on this one?
@augustoproiete nothing.
@fandrei Do you want to put together a reproducible example that we can test? Or should we close this one for the time being?
@augustoproiete I have no idea how to reproduce it.