NAVmoble - the pocket-sized ERP
Optimized for Microsoft Dynamics NAV and Windows Mobile powered devices

Friday, June 09, 2006

Unspecified error 80004005

Lately, I am working over a Visual Studio 2005 Add-In for our NavMobile product. It is meant to allow our partners to be more productive, while customizing the solution for their customers. Yesterday, we've spent some time clearing old stuff from our central source repository.
Later, I've opened the Add-In Project and this message box appeared on my desktop after running the project:

This message was not quite helpful for me, although I knew there is a problem with the output assembly loading. I've tried some goggling, but no luck. I've checked the \BIN folder security settings, but there wasn't anything wrong. Finally, after an hour or so I solved my problem.

When a new project of type "Extensibility/Visual Studio Add-in" is created you'll get a bunch of files, including 2 files with ".Add-In " extension.
1.MyAddInProject.AddIn
2.MyAddInProject - For Testing.AddIn".

However during our source repository clearing, we've accidentally deleted the file #2. This file is created by default in ...\My Documents\Visual Studio 2005\AddIns
When I've opened the project first I saw the file #2 is missing. I've created a file with the same name and copied the content from file #1. And this was the reason to get the error message.

These files contain XML describing the Add-In and they are used by VS2005 in order to know which Add-Ins to load. The files contain a tag named /Extensibility/Addin/Assembly,which points to the Add-In assembly name. However, by default file #2 contains the full path to the assembly Add-Ins and file #1 contains only the name of the assembly.

The error dissappeared after placing the full path to the assembly Add-In in the /Extensibility/Addin/Assembly tag.

In general: if you get such an error, while trying to debug your Add-In, check if the assembly path written in file #2 is "visible" for VS2005.

5 comments:

Anonymous said...

Thank you, Ruslan! I had the same problems but my add-ins are working now.

Ruslan Trifonov said...

I'm glad to hear that!

Anonymous said...

Thanks! - I was getting this error after upgrade from vs2005 to vs2008.

Unknown said...

Thanks a lot! It really helps me.

Sophiane said...

Thanks a lot too !