Skip to content

InvalidCastException when dragging a file to Visual Studio #13

@sharwell

Description

@sharwell

Current behavior

System.InvalidCastException: Specified cast is not valid.
at System.Windows.Forms.IDataObject.GetDataPresent(Type format)
at ICSharpCode.TextEditor.TextAreaDragDropHandler.OnDragEnter(Object sender, DragEventArgs e)
at ICSharpCode.TextEditor.TextAreaDragDropHandler.<>c__DisplayClass3_0.<MakeDragEventHandler>b__0(Object sender, DragEventArgs e)

Expected behavior

No error.

Steps to reproduce

The preconditions for this state are unknown. Once entering the bad state, the behavior is triggered by attempting to drag a file from the Diff tab of FormBrowse to a Visual Studio window.

Screenshots

image

Did this work in previous version of GitExtensions

I've observed this occasionally for a long time (multiple versions).

Environment

  • Git Extensions 3.0.2.5232
  • Build 23b6f51905006ccdde8701591df706284b4155dc
  • Git 2.19.1.windows.1
  • Microsoft Windows NT 10.0.17763.0
  • .NET Framework 4.7.3362.0
  • DPI 96dpi (no scaling)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions