VS2019: Object reference exception while adding new files

Adding new files to any (Oxygene, others unkown) project in Visual Studio throws an exception.

Right click project in solution → Add → New Item… → Oxygene items → Class → Add

image

Happens with other items too.

What works: Right click project in solution → Add new class… → Oxygene items → Class → Add

We cannot reproduce this here at will, so there must be something more involved (also, else someone else would have noticed this before :). Does this happen for you in any project *even, say, one created fresh from template) or just a specific one? If the latter,c an we see that project, or a narrowed down test case that shows the issue for you?

thanx.

It happens in freshly created projects too.

Item types “codefile” and “class” fail almost every time for me. Even with the error message, the files are created and can be opened normally afterwards.

Forms sometimes.
If creating a new form fails, the .Designer.pas and the *.resx are not created.

@viktoriad, can you work with Timm to reproduce this?

@tkautz, could you do me a favor, attach a second copy of Visual Studio as debugger, enable to break on all Exceptions, disable Just My Code in debugger options, and see if you can get a full callstack for this exception?

thanx!

Does this help?

Exception

System.NullReferenceException
  HResult=0x80004003
  Message=Object reference not set to an instance of an object.
  Source=RemObjects.Elements.Oxygene
  StackTrace:
   at RemObjects.Elements.Code.Oxygene.Parser.IndentLineFixIt(CMPoint Point, Boolean aCheckIndentKind, List`1& aPreviousDeltas, Int32& aIndent)

Call Stack

| |RemObjects.Elements.Oxygene.dll!RemObjects.Elements.Code.Oxygene.Parser.IndentLineFixIt(RemObjects.Oxygene.Code.CMPoint Point, bool aCheckIndentKind, ref System.Collections.Generic.List<int> aPreviousDeltas, out int aIndent)|Unknown|
| |RemObjects.Elements.dll!RemObjects.Oxygene.Code.BaseParser.FormatSelectionListFixIt(ref RemObjects.Oxygene.Code.CMSpan aSpan, RemObjects.Oxygene.Code.Compiler.Compiler aCompiler)|Unknown|
| |RemObjects.Elements.dll!RemObjects.Oxygene.Code.BaseParser.FormatSelectionFixIt(ref RemObjects.Oxygene.Code.CMSpan aSpan, ref int aRow, ref int aCol, RemObjects.Oxygene.Code.Compiler.Compiler aCompiler)|Unknown|
| |RemObjects.Elements.VisualStudio.Language.16.dll!RemObjects.Oxygene.VisualStudio.VSUtils.FormatDocument(RemObjects.Oxygene.VisualStudio.VSTextLinesWrapper aEditor, RemObjects.Oxygene.VisualStudio.VSTextViewWrapper aSelectionManager, RemObjects.Oxygene.Code.BaseParser aParser, RemObjects.Oxygene.Code.Compiler.Compiler aCompiler)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneBaseFileNode.AfterLoad()|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.OnFileAdded(RemObjects.VisualStudio.Project.HierarchyNode aChild)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.AddNewFileNodeToHierarchy(RemObjects.VisualStudio.Project.HierarchyNode parentNode, string fileName)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.AddItemWithSpecific(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.AddItem(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.AddItem(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.Automation.OAProjectItems.AddFromTemplate.AnonymousMethod__0()|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.UIThread.DoOnUIThread<EnvDTE.ProjectItem>(System.Func<EnvDTE.ProjectItem> callback)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.Automation.OAProjectItems.AddFromTemplate(string fileName, string name)|Unknown|
| |Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.EnumContentsAddItem(EnvDTE.ProjectItems projectItems, System.Xml.XmlNode contentNode, string projectName, string currentFolder, string currentTargetFolder, string rootName, string templateFolderPath, string destinationRootFolderPath, string userSpecifiedDestItemPath, string projectTypeString, System.Collections.Generic.List<Microsoft.VisualStudio.TemplateWizard.WizardExtension> wizardExtensions, string rootExtension)|Unknown|
| |Microsoft.VisualStudio.TemplateWizard.dll!Microsoft.VisualStudio.TemplateWizard.Wizard.Execute(object application, int hwndOwner, ref object[] ContextParams, ref object[] CustomParams, ref EnvDTE.wizardResult retval)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.RunWizard(RemObjects.VisualStudio.Project.HierarchyNode parentNode, string itemName, string wizardToRun, System.IntPtr dlgOwner)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.RunWizard(RemObjects.VisualStudio.Project.HierarchyNode parentNode, string itemName, string wizardToRun, System.IntPtr dlgOwner)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.AddItemWithSpecific(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, uint editorFlags, ref System.Guid editorType, string physicalView, ref System.Guid logicalView, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.AddItem(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.AddItem(uint itemIdLoc, Microsoft.VisualStudio.Shell.Interop.VSADDITEMOPERATION op, string itemName, uint filesToOpen, string[] files, System.IntPtr dlgOwner, Microsoft.VisualStudio.Shell.Interop.VSADDRESULT[] result)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.ServiceHelper.AddNewItem(Microsoft.VisualStudio.TemplateProviders.Templates.IVsTemplate template, string itemLocation, Microsoft.Internal.VisualStudio.Shell.Interop.VSNEWPROJECTDLGCTX context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, uint parentItemId, bool isCodeInSeparateFile, uint newWebItemOptions, bool isSelectMaster, string selectedLanguageForWebItems, Microsoft.VisualStudio.Dialogs.OpenWithEditorSelection openWithParameters, bool useRemoteApi)|Unknown|
| |Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.NewProjectDialog.LegacyItemTemplateProvider.InstantiateItemTemplateAsync(Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationContext context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, System.Threading.CancellationToken cancellationToken)|Unknown|
| |[Resuming Async Method]||
| |mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.InvokeMoveNext(object stateMachine)|Unknown|
| |mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)|Unknown|
| |mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)|Unknown|
| |mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.MoveNextRunner.Run()|Unknown|
| |mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.OutputAsyncCausalityEvents.AnonymousMethod__0()|Unknown|
| |mscorlib.dll!System.Runtime.CompilerServices.AsyncMethodBuilderCore.ContinuationWrapper.Invoke()|Unknown|
| |Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.SingleExecuteProtector.TryExecute()|Unknown|
| |Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTask.CompleteOnCurrentThread()|Unknown|
| |Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTask<Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationResult>.CompleteOnCurrentThread()|Unknown|
| |Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTaskFactory.Run<Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationResult>(System.Func<System.Threading.Tasks.Task<Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationResult>> asyncMethod, Microsoft.VisualStudio.Threading.JoinableTaskCreationOptions creationOptions)|Unknown|
| |Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.ServiceHelper.AddNewItem(Microsoft.VisualStudio.TemplateProviders.Templates.IVsTemplate template, string itemLocation, Microsoft.Internal.VisualStudio.Shell.Interop.VSNEWPROJECTDLGCTX context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, uint parentItemId, bool isCodeInSeparateFile, uint newWebItemOptions, bool isSelectMaster, string selectedLanguageForWebItems, Microsoft.VisualStudio.Dialogs.OpenWithEditorSelection openWithParameters, bool useRemoteApi)|Unknown|
| |Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.SVsDialogService.InvokeDialog(Microsoft.Internal.VisualStudio.Shell.Interop.VSNEWPROJECTDLGINFO dlgInfo, bool useRemotableApi, out string bstrLocation)|Unknown|
| |Microsoft.VisualStudio.Dialogs.dll!Microsoft.VisualStudio.Dialogs.SVsDialogService.InvokeDialog(Microsoft.Internal.VisualStudio.Shell.Interop.VSNEWPROJECTDLGINFO dlgInfo, out string bstrLocation)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.AddItemToHierarchy(RemObjects.VisualStudio.Project.HierarchyAddType addType, string aSelectedCategory, string aSelectedItem)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.AddItemToHierarchy(RemObjects.VisualStudio.Project.HierarchyAddType addType)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.ExecCommandOnNode(System.Guid cmdGroup, uint cmd, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.ProjectNode.ExecCommandOnNode(System.Guid cmdGroup, uint cmd, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.Oxygene.VisualStudio.OxygeneProject.OxygeneProjectNode.ExecCommandOnNode(System.Guid cmdGroup, uint cmd, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.InternalExecCommand(System.Guid cmdGroup, uint cmdId, uint cmdExecOpt, System.IntPtr vaIn, System.IntPtr vaOut, RemObjects.VisualStudio.Project.CommandOrigin commandOrigin)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.Exec(ref System.Guid guidCmdGroup, uint nCmdId, uint nCmdExecOpt, System.IntPtr pvaIn, System.IntPtr pvaOut)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.DataSource.Invoke(string verb, object pvaIn, out object pvaOut)|Unknown|
| |Microsoft.VisualStudio.Shell.UI.Internal.dll!Microsoft.VisualStudio.PlatformUI.VsCommand.Execute(object parameter)|Unknown|
| |PresentationFramework.dll!MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource commandSource, bool userInitiated)|Unknown|
| |PresentationFramework.dll!System.Windows.Controls.MenuItem.InvokeClickAfterRender(object arg)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl()|Unknown|
| |WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state)|Unknown|
| |WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(object obj)|Unknown|
| |mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)|Unknown|
| |mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)|Unknown|
| |mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state)|Unknown|
| |WindowsBase.dll!MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext executionContext, System.Threading.ContextCallback callback, object state)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke()|Unknown|
| |WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue()|Unknown|
| |WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |Microsoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PushMessageLoopOnContextMenuTrackingComponent.AnonymousMethod__245_1(object sender, Microsoft.VisualStudio.PlatformUI.OleComponentSupport.PreTranslateMessageEventArgs args)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.FPreTranslateMessageCore(Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FPreTranslateMessage.AnonymousMethod__0()|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.CallAndReturnOnException(System.Func<int> method, int retValueOnException)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent.Microsoft.VisualStudio.OLE.Interop.IOleComponent.FPreTranslateMessage(Microsoft.VisualStudio.OLE.Interop.MSG[] pMsg)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |Microsoft.VisualStudio.Platform.WindowManagement.dll!Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.PushMessageLoopOnContextMenuTrackingComponent()|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.ShowContextMenu(int menuId, System.Guid menuGroup, Microsoft.VisualStudio.Shell.Interop.POINTS points)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.DisplayContextMenu(System.Collections.Generic.IList<RemObjects.VisualStudio.Project.HierarchyNode> selectedNodes, System.IntPtr pointerToVariant)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.ExecCommandThatDependsOnSelectedNodes(System.Guid cmdGroup, uint cmdId, uint cmdExecOpt, System.IntPtr vaIn, System.IntPtr vaOut, RemObjects.VisualStudio.Project.CommandOrigin commandOrigin, System.Collections.Generic.IList<RemObjects.VisualStudio.Project.HierarchyNode> selectedNodes, out bool handled)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.InternalExecCommand(System.Guid cmdGroup, uint cmdId, uint cmdExecOpt, System.IntPtr vaIn, System.IntPtr vaOut, RemObjects.VisualStudio.Project.CommandOrigin commandOrigin)|Unknown|
| |RemObjects.Elements.VisualStudio.Project.16.dll!RemObjects.VisualStudio.Project.HierarchyNode.ExecCommand(uint itemId, ref System.Guid guidCmdGroup, uint nCmdId, uint nCmdExecOpt, System.IntPtr pvain, System.IntPtr p)|Unknown|
| |[Native to Managed Transition]||
| |[Managed to Native Transition]||
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.ExecHierParentChain.AnonymousMethod__1()|Unknown|
| |Microsoft.VisualStudio.Shell.Framework.dll!Microsoft.VisualStudio.ErrorHandler.CallWithCOMConvention(System.Func<int> method, bool reportError, bool setShellErrorInfo)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.HierarchyUtilities.ExecHierParentChain(Microsoft.VisualStudio.Shell.IVsHierarchyItemManager manager, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy lpUIHCmd, Microsoft.VisualStudio.Shell.Interop.IVsUIHierarchy lpUIHCurrent, uint itemidCurrent, ref System.Guid pguidCmdGroupRef, uint nCmdID, uint nCmdexecopt, System.IntPtr pvaIn, System.IntPtr pvaOut)|Unknown|
| |Microsoft.VisualStudio.Shell.TreeNavigation.HierarchyProvider.dll!Microsoft.VisualStudio.PlatformUI.HierarchyItem.HierarchyContextMenuController.ShowContextMenu(System.Collections.Generic.IEnumerable<object> items, System.Windows.Point location)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.ContextMenuController.ShowContextMenu(System.Collections.Generic.IEnumerable<Microsoft.Internal.VisualStudio.PlatformUI.IContextMenuPattern> items, System.Windows.Point location, System.Func<Microsoft.Internal.VisualStudio.PlatformUI.IContextMenuPattern, Microsoft.Internal.VisualStudio.PlatformUI.IContextMenuController> getController)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.ContextMenuController.ShowContextMenu(System.Collections.Generic.IEnumerable<Microsoft.Internal.VisualStudio.PlatformUI.IContextMenuPattern> items, System.Windows.Point location)|Unknown|
| |Microsoft.VisualStudio.Shell.15.0.dll!Microsoft.Internal.VisualStudio.PlatformUI.PivotTreeView.OnContextMenuOpening(System.Windows.Controls.ContextMenuEventArgs e)|Unknown|
| |PresentationFramework.dll!System.Windows.FrameworkElement.OnContextMenuOpeningThunk(object sender, System.Windows.Controls.ContextMenuEventArgs e)|Unknown|
| |PresentationFramework.dll!System.Windows.Controls.ContextMenuEventArgs.InvokeEventHandler(System.Delegate genericHandler, object genericTarget)|Unknown|
| |PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target)|Unknown|
| |PresentationCore.dll!System.Windows.RoutedEventHandlerInfo.InvokeHandler(object target, System.Windows.RoutedEventArgs routedEventArgs)|Unknown|
| |PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised)|Unknown|
| |PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args)|Unknown|
| |PresentationCore.dll!System.Windows.ContentElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs args)|Unknown|
| |PresentationCore.dll!System.Windows.ContentElement.RaiseEvent(System.Windows.RoutedEventArgs args, bool trusted)|Unknown|
| |PresentationFramework.dll!System.Windows.Controls.PopupControlService.RaiseContextMenuOpeningEvent(System.Windows.IInputElement source, double x, double y, bool userInitiated)|Unknown|
| |PresentationFramework.dll!System.Windows.Controls.PopupControlService.ProcessMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)|Unknown|
| |PresentationFramework.dll!System.Windows.Controls.PopupControlService.OnPostProcessInput(object sender, System.Windows.Input.ProcessInputEventArgs e)|Unknown|
| |PresentationCore.dll!System.Windows.Input.InputManager.RaiseProcessInputEventHandlers(System.Windows.Input.ProcessInputEventHandler postProcessInput, System.Windows.Input.ProcessInputEventArgs processInputEventArgs)|Unknown|
| |PresentationCore.dll!System.Windows.Input.InputManager.ProcessStagingArea()|Unknown|
| |PresentationCore.dll!System.Windows.Input.InputManager.ProcessInput(System.Windows.Input.InputEventArgs input)|Unknown|
| |PresentationCore.dll!System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport inputReport)|Unknown|
| |PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.ReportInput(System.IntPtr hwnd, System.Windows.Input.InputMode mode, int timestamp, System.Windows.Input.RawMouseActions actions, int x, int y, int wheel)|Unknown|
| |PresentationCore.dll!System.Windows.Interop.HwndMouseInputProvider.FilterMessage(System.IntPtr hwnd, MS.Internal.Interop.WindowMessage msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)|Unknown|
| |PresentationCore.dll!System.Windows.Interop.HwndSource.InputFilterMessage(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler)|Unknown|
| |WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs)|Unknown|
| |WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam)|Unknown|
| |[Async Call Stack]||
| |[Async] Microsoft.VisualStudio.TemplateProviders.Implementation.dll!Microsoft.VisualStudio.TemplateProviders.TemplateProviderSupport.ExceptionLoggingTemplateProviderDecorator.InstantiateItemTemplateAsync(Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationContext context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, System.Threading.CancellationToken cancellationToken)|Unknown|
| |[Async] Microsoft.VisualStudio.TemplateProviders.Implementation.dll!Microsoft.VisualStudio.TemplateProviders.TemplateProviderSupport.AggregateTemplateProvider.InstantiateItemTemplateAsync(Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationContext context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, System.Threading.CancellationToken cancellationToken)|Unknown|
| |[Async] Microsoft.VisualStudio.TemplateProviders.Implementation.dll!Microsoft.VisualStudio.TemplateProviders.TemplateProviderSupport.ParentItemSelectorTemplateProviderDecorator.InstantiateItemTemplateAsync(Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationContext context, Microsoft.VisualStudio.Shell.Interop.IVsProject project, System.Threading.CancellationToken cancellationToken)|Unknown|
| |[Async] Microsoft.ServiceHub.Framework.dll!Microsoft.ServiceHub.Framework.ServiceJsonRpcDescriptor.LocalProxyGeneration.ReturnedTaskOfTHelper.AnonymousMethod__0(System.Threading.Tasks.Task<Microsoft.VisualStudio.TemplateProviders.TemplateProviderApi.TemplateInstantiationResult> _)|Unknown|
| |[Async] Microsoft.VisualStudio.Threading.dll!Microsoft.VisualStudio.Threading.JoinableTask.SetWrappedTask.AnonymousMethod__81_0(System.Threading.Tasks.Task t, object s)|Unknown|

It should, thanx.

Thanks, logged as bugs://85689

Thanks, logged as bugs://85702

bugs://85702 got closed with status fixed.

bugs://85689 got closed with status fixed.