nicholas-ross/SSMS-Schema-Folders

SSMS v18.1 Cant drag objects from Object Explore

mthode88 opened this issue · 1 comments

There is a bug in v18.1, possibly v18+ that doesn't allow you to drag an object from the object explorer to the query window. It encounters and exception and locks up SSMS.

Stack Trace:
System.ObjectDisposedException: Cannot access a closed Stream. at System.IO.__Error.StreamIsClosed() at System.IO.MemoryStream.get_Length() at System.Windows.Forms.DataObject.SaveStreamToHandle(IntPtr& handle, Stream stream) at System.Windows.Forms.DataObject.SaveDataToHandle(Object data, String format, STGMEDIUM& medium) at System.Windows.Forms.DataObject.GetDataIntoOleStructs(FORMATETC& formatetc, STGMEDIUM& medium) at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetDataHere(FORMATETC& formatetc, STGMEDIUM& medium) at System.Windows.Forms.DataObject.System.Runtime.InteropServices.ComTypes.IDataObject.GetData(FORMATETC& formatetc, STGMEDIUM& medium) at System.Windows.DataObject.OleConverter.GetDataInner(FORMATETC& formatetc, STGMEDIUM& medium) at System.Windows.DataObject.OleConverter.GetDataFromOleHGLOBAL(String format, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetDataFromBoundOleDataObject(String format, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert, DVASPECT aspect, Int32 index) at System.Windows.DataObject.OleConverter.GetData(String format, Boolean autoConvert) at System.Windows.DataObject.GetData(String format, Boolean autoConvert) at System.Windows.DataObject.GetData(String format) at Microsoft.VisualStudio.Editor.Implementation.Common.DataObjectHelper.ConvertToOleDataObject(IDataObject source) at Microsoft.VisualStudio.Editor.Implementation.DragDrop.LanguageServiceTextDropHandler.IsDropEnabled(DragDropInfo dragDropInfo) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DropHandlerManager.<>c__DisplayClass4_0.<GetSupportingHandler>b__0(IDropHandler handler) at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func2 predicate) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DropHandlerManager.GetSupportingHandler(DragDropInfo dragDropInfo) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DragDropStateManager.HandleFromStartToDragging(DragDropInfo dragDropInfo) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DragDropStateManager.SetToDragging(DragDropInfo dragDropInfo) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DragDropMouseProcessor.HandleDragEnter(DragDropInfo dragDropInfo, DragDropEffects& resultingDragEffects) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DragDropMouseProcessor.DoPreprocessDragEnter(DragEventArgs e, Point position) at Microsoft.VisualStudio.Text.Editor.DragDrop.Implementation.DragDropMouseProcessor.PreprocessDragEnter(DragEventArgs e) at Microsoft.VisualStudio.Text.Utilities.WpfMouseProcessor.<>c__DisplayClass46_0.<UIElement_DragEnter>b__0(IMouseProcessor p) at Microsoft.VisualStudio.Text.Utilities.WpfMouseProcessor.<>c__DisplayClass56_1.<MouseProcessorHandler>b__0() at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.CallExtensionPoint(Object errorSource, Action call)

This is a known bug in SSMS. https://docs.microsoft.com/en-us/sql/ssms/release-notes-ssms?view=sql-server-2017#known-issues-181

Although it won't let you click the Ok button to dismiss the error, you can press enter and continue using SSMS.