New install - exception on loading

Topics: Bugs
Jun 22, 2007 at 12:46 PM
Just installed sandcastle June CTP then a new (first time) install of DocProject. Upon opening Visual Studion 2005 Pro, I get a message box informing me that the DocProject add-in caused an exception and will be disabled. Looking in the event log reveals:

Event Type: Error
Event Source: DocProject
Event Category: None
Event ID: 0
Date: 22/06/2007
Time: 12:37:41
User: N/A
Computer: EUROPA
Description:
An error occurred while initializing the DocProject Add-In.

System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.ObjectTestBench.OtbCommandHandlers.DynSMethodInFirstBeforeQueryStatus(Object source, EventArgs args)
at Microsoft.VisualStudio.Shell.OleMenuCommand.get_OleStatus()
at Microsoft.VisualStudio.Shell.OleMenuCommandService.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& guidGroup, UInt32 nCmdId, OLECMD[] oleCmd, IntPtr oleText)
at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.QueryStatus(Guid& guidGroup, UInt32 nCmdId, OLECMD[] oleCmd, IntPtr oleText)
at Microsoft.VisualStudio.CommandBars.CommandBars.getItem(Object Index)
at DaveSexton.DocProject.DteComponent.GetCommandBar(String name)
at DaveSexton.DocProject.DocProjectAddIn.RegisterToolBar(ToolBar item)
at DaveSexton.DocProject.ToolBarCollection.InsertItem(Int32 index, ToolBar item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at DaveSexton.DocProject.DocProjectAddIn.Initialize()
at DaveSexton.DocProject.DocProjectAddIn.Extensibility.IDTExtensibility2.OnStartupComplete(Array& custom)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Jun 22, 2007 at 1:55 PM
Hi,

It appears that you may have discovered a bug in Visual Studio.

In the next release, which will probably be soon, I'll make sure that the Add-In can still load even if it can't load the command bar. In the mean time I'll do some research to see if there are any workarounds, although my initial research hasn't turned up any information at all.

Sorry for any inconvenience. If you want to try to update the source code yourself see How To Use The Source Code for guidance.

Thanks,
Dave
Jun 27, 2007 at 1:24 AM
Hi,

Has the issue been resolved for you in the DocProject 1.6.2 release?

Thanks,
Dave