VS2005 Add-in fails to load, error 80070057 - Solved

Topics: Bugs
Jan 9, 2009 at 1:05 AM
Edited Jan 9, 2009 at 1:37 AM
Though I can add DocProjects to my solutions, and compile them to create output successfully, I can't get the add-in to load into my VisualStudio2005.  I can _see_ the add-in through the manager, but whenever I try to enable it, I get a msgbox:
The Add-in 'Dave Sexton's DocProject' failed to load or caused an exception.
Would you like to remove this Add-in?
If you choose yes, the file it was loaded from, 'C:\Documents and Settings\tonyg\My Documents\Visual Studio 2005\Addins\DocProject.Addin', will be renamed.

Error Message: The parameter is incorrect.

Error Number: 80070057
There is no exception in the application or system event logs corresponding to this problem.  I have searched this site, googled, and tried several rounds of un/re installing DocProject  I'm using Visual Studio Professional 8.0.50727.42,  XP Pro Version 2002 Service Pack 3.

I have no idea how to proceed - I don't get the toolbar and I can't set any plugin properties from within VS, even though I can generate documentation.  So far, I have just used the External UI to configure things, and that's fine for now.
All the best,
Tony Gray

PS - In the interest of full disclosure, I did have an old version of DocProject on my machine some time ago and then recently updated to the latest.  It seems likely that some unremoved remnants of the original are interfering, but I can't figure out how.
Jan 9, 2009 at 2:11 AM
Hi Tony,

Since there's no relevant information in the event log, downloading the source code and attaching the debugger is probably the next best step.  Maybe this way you can at least provide me with a stack trace.

The code is available on the Source Code tab.  Instructions are in the How To Use The Source Code article; although, you won't be able to build the code unless you use VS 2008, so instead try using Debug > Attach to Process and attach to another instance of devenv.exe.  Make sure that VS is set to break on all thrown CLR exceptions (Debug > Exceptions, or Ctrl+Alt+E) and then try enabling the add-in with the debugger attached.

If you have any questions please let me know.

- Dave

> It seems likely that some unremoved remnants of the original are interfering

What version of DocProject?  I doubt there would be conflicts, but anything before 1.2.1 must be uninstalled manually so maybe there is.
Jan 9, 2009 at 5:35 PM
Hi Dave,

I downloaded the source (had to change the version number from 10 to 9 in the .sln to get it to load in VS2005), set the exceptions to catch _all_ thrown (CLR and all others), attached to the other devenv process and still no luck - no breakpoint hit in the second debugger.  Now that I look at it though, there are no PDBs with the source and since I can't build, that might be the problem.  Any chance I could get a zip of the PDBs that match the source? 

I realize that until I can find a way to get some diagnostic information, there's nothing for you to go on.  When I get around to installing VS2008 maybe I'll have more luck.

Generally though, DocProject is great and you rule.  Thanks for taking the time.

Jan 9, 2009 at 6:48 PM
Edited Jan 9, 2009 at 6:50 PM
Hi Tony,

Send me your email address using my contact form and I'll respond with the 1.11.0 pdb attached.

If that doesn't work, you may want to try to rebuild the code by changing any C# 3.0 code to its equivalent in C# 2.0, and remove any code that breaks but isn't a requirement, such as a reference to the VS C++ extensibility library if C++ isn't installed, and of course any related code.  For Help 2.x functionality, you must install the VS 2005 SDK although it might not be required, so you can try it without the SDK first; you could even comment out the Help 2.x-related code if necessary.

Even though you will have rebuilt the software for VS 2005, no significant functionality should have been changed.  So maybe you'll still be able to repro.  But if you find that you can't then at least you will have narrowed down the problem a bit :)

- Dave
Jan 9, 2009 at 9:48 PM
Edited Jan 9, 2009 at 9:50 PM
Hi Dave - problem solved and it was my fault.

When I was following the debug instructions under "Testing The Solution" at http://www.codeplex.com/DocProject/Wiki/View.aspx?title=How%20To%20Use%20The%20Source%20Code#Testing I had a look inside my .addin file.  The version that VS2005 was reading was the unmodified 'as delivered' version which hadn't been edited by the installer to have the correct path and assembly name in the <Assembly> section. 

I un/re installed, the installer did its work to replace the 




Assigned by the InstallAction project's ContentInstaller class during installation -->




comments with real values, and I was able to load - didn't need to debug after all.  Which also explains why my 2nd debugger never broke on the exception since the correct assembly never got called.  How I got the unedited version in there I'm not too sure, but it must have been me.

Sorry to bother you, thanks for all your help.