JetBrains ReSharper 3.0 Exceptions Trying to Edit Options

Trying to edit some ReSharper options I used to get an internal exception alerts. The first thing I thought about was reinstall of ReSharper. The problem is that simple reinstall was not effective. As ReSharper uninstall is not clean for some reason it leaves some garbage after itself. So I just searched my computer for files and folders containing jetbrains or resharper in their names and deleted all. After that i did the same with registry entries. After such a cleanup the next install was successful. Initial exception text was something like:

ReSharper 3.0 Version=3.0.471.2, Edition=, Built=2007-06-29T12:53:38, Configuration=ReSharper_AddIn, VsVersion=9.0
JetBrains.Util.InternalErrorException: Failed to create an options page from type “JetBrains.ReSharper.OptionPages.CodeStyle.CSharp.NamingStylePage, JetBrains.ReSharper.CommonActions, Version=3.0.471.2, Culture=neutral, PublicKeyToken=null”. Exception has been thrown by the target of an invocation. The options page is expected to have a public constructor that is either a “.ctor()” or a “.ctor(JetBrains.UI.Options.IOptionsDialog, JetBrains.UI, Version=3.0.471.2, Culture=neutral, PublicKeyToken=1010a0d8d6380325)”. —> System.InvalidOperationException: Failed to create an options page from type “JetBrains.ReSharper.OptionPages.CodeStyle.CSharp.NamingStylePage, JetBrains.ReSharper.CommonActions, Version=3.0.471.2, Culture=neutral, PublicKeyToken=null”. Exception has been thrown by the target of an invocation. The options page is expected to have a public constructor that is either a “.ctor()” or a “.ctor(JetBrains.UI.Options.IOptionsDialog, JetBrains.UI, Version=3.0.471.2, Culture=neutral, PublicKeyToken=1010a0d8d6380325)”. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.InvalidOperationException: Failed to create an options page from type “JetBrains.ReSharper.OptionPages.CodeStyle.CodeStyleSharingPage, JetBrains.ReSharper.CommonActions, Version=3.0.471.2, Culture=neutral, PublicKeyToken=null”. Exception has been thrown by the target of an invocation. The options page is expected to have a public constructor that is either a “.ctor()” or a “.ctor(JetBrains.UI.Options.IOptionsDialog, JetBrains.UI, Version=3.0.471.2, Culture=neutral, PublicKeyToken=1010a0d8d6380325)”. —> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.NullReferenceException: Object reference not set to an instance of an object.
at JetBrains.ReSharper.Psi.CodeStyle.CodeStyleSettings.Clone() in c:\Agent\work\Server\ReSharper-3.0\src\Psi\src\codeStyle\CodeStyleSettings.cs:line 149
at JetBrains.ReSharper.OptionPages.CodeStyle.CodeStyleSharingPage..ctor(IOptionsDialog optionsDialog) in c:\Agent\work\Server\ReSharper-3.0\src\CommonActions\src\OptionPages\CodeStyle\CodeStyleSharingPage.cs:line 71
— End of inner exception stack trace —
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at JetBrains.UI.Options.OptionsPageDescriptor.CreateView(IOptionsDialog owner) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsPageDescriptor.cs:line 134
— End of inner exception stack trace —
at JetBrains.UI.Options.OptionsPageDescriptor.CreateView(IOptionsDialog owner) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsPageDescriptor.cs:line 164
at JetBrains.ReSharper.OptionsUI.Impl.OptionPageViewStore.GetPageView(OptionsPageDescriptor descriptor) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionPageViewStore.cs:line 62
at JetBrains.ReSharper.OptionsUI.Impl.OptionsDialog.GetPage(String id) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsDialog.cs:line 1003
at JetBrains.ReSharper.OptionPages.CodeStyle.CSharp.NamingStylePage.InitControls() in c:\Agent\work\Server\ReSharper-3.0\src\CommonActions\src\OptionPages\Languages\Common\NamingStylePage.cs:line 35
at JetBrains.ReSharper.OptionPages.CodeStyle.CSharp.NamingStylePage..ctor(IOptionsDialog optionsDialog) in c:\Agent\work\Server\ReSharper-3.0\src\CommonActions\src\OptionPages\Languages\Common\NamingStylePage.cs:line 28
— End of inner exception stack trace —
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at JetBrains.UI.Options.OptionsPageDescriptor.CreateView(IOptionsDialog owner) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsPageDescriptor.cs:line 134
— End of inner exception stack trace —
at JetBrains.UI.Options.OptionsPageDescriptor.CreateView(IOptionsDialog owner) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsPageDescriptor.cs:line 164
at JetBrains.ReSharper.OptionsUI.Impl.OptionPageViewStore.GetPageView(OptionsPageDescriptor descriptor) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionPageViewStore.cs:line 62
at JetBrains.ReSharper.OptionsUI.Impl.OptionsDialog.OnTreeViewSelectionChanged_GetPageToSelect() in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsDialog.cs:line 860
at JetBrains.ReSharper.OptionsUI.Impl.OptionsDialog.OnTreeViewSelectionChanged(Object sender, EventArgs e) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsDialog.cs:line 838
— End of inner exception stack trace —

at JetBrains.Util.Logger.LogExceptionEx(Exception, String, Boolean) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 263 column 4
at JetBrains.Util.Logger.LogException(Exception) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.Util\src\Logger\Logger.cs:line 273 column 3
at JetBrains.ReSharper.OptionsUI.Impl.OptionsDialog.OnTreeViewSelectionChanged(Object, EventArgs) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsDialog.cs:line 842 column 5
at DevExpress.XtraTreeList.TreeList.RaiseFocusedNodeChanged(TreeListNode, TreeListNode)
at DevExpress.XtraTreeList.TreeList.InternalSetFocusedRowIndex(Int32)
at DevExpress.XtraTreeList.TreeList.set_FocusedRowIndex(Int32)
at DevExpress.XtraTreeList.Handler.NodePressedState.ChangeSelection(RowInfo)
at DevExpress.XtraTreeList.Handler.NodePressedState.Init()
at DevExpress.XtraTreeList.Handler.TreeListHandler.SetControlState(TreeListState)
at DevExpress.XtraTreeList.Handler.NormalState.OnPressNode()
at DevExpress.XtraTreeList.Handler.NormalState.MouseDown(MouseEventArgs, TreeListHitTest)
at DevExpress.XtraTreeList.Handler.TreeListHandler.OnMouseDown(MouseEventArgs)
at DevExpress.XtraTreeList.TreeList.OnMouseDown(MouseEventArgs)
at System.Windows.Forms.Control.WmMouseDown(Message&, MouseButtons, Int32)
at System.Windows.Forms.Control.WndProc(Message&)
at DevExpress.XtraEditors.Container.EditorContainer.WndProc(Message&)
at JetBrains.UI.TreeView.TreeModelView.WndProc(Message&) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\TreeView\TreeModelView.cs:line 1278 column 5
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message&)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message&)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr, Int32, IntPtr, IntPtr)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG&)
at System.Windows.Forms.ThreadContext.LocalModalMessageLoop(Form)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32, ApplicationContext)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32, ApplicationContext)
at System.Windows.Forms.Form.ShowDialog(IWin32Window)
at JetBrains.UI.Shell.WindowUtil.ShowDialog(Form, IWin32Window) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Shell\WindowUtil.cs:line 53 column 9
at JetBrains.UI.Options.OptionsManager.ShowOptions() in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\OptionsManager.cs:line 293 column 5
at JetBrains.UI.Options.ShowOptionsAction.Execute(IDataContext, DelegateExecute) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\Options\ShowOptionsAction.cs:line 18 column 3
at JetBrains.ActionManagement.ExecutableAction.Execute(IDataContext) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\ActionSystem\Action\ExecutableAction.cs:line 30 column 13
at JetBrains.ActionManagement.ActionManagerBase.ExecuteAction(IExecutableAction, IDataContext) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\ActionSystem\ActionManager\ActionManagerBase.cs:line 576 column 11
at JetBrains.ActionManagement.ActionManagerBase.ExecuteAction(IExecutableAction) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\ActionSystem\ActionManager\ActionManagerBase.cs:line 521 column 5
at JetBrains.ActionManagement.ActionManagerBase.ExecuteAction(String) in c:\Agent\work\Server\ReSharper-3.0\Platform\src\JetBrains.UI\src\ActionSystem\ActionManager\ActionManagerBase.cs:line 516 column 5
at JetBrains.ReSharper.VS.Customization.ReSharperPkg.Exec(Guid&, UInt32, UInt32, IntPtr, IntPtr) in c:\Agent\work\Server\ReSharper-3.0\src\VS\src\Customization\ReSharperPkg.cs:line 44 column 6
at Microsoft.VisualStudio.VSIP.Helper.Package.Microsoft.VisualStudio.OLE.Interop.IOleCommandTarget.Exec(Guid&, UInt32, UInt32, IntPtr, IntPtr)

Leave a Reply