Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DragDrop registration did not succeed in Setup Project

We have some installation project in Visual Studio solution (Other project types -> Setup and deployment -> Setup project). This project has another library type project with Installation class named InstallationCore like project output. In user action, I call to Install and Uninstall functions of installer of InstallationCore.

InstallationCore has windows forms for interaction with user. There, in forms, I use Drag and Drop functionality for Drag and Drop text from Tree View to Text Box.
But in line:

txbUserName.AllowDrop = true; 

I get error of JIT debugger:

Unhandled exception has occured
DragDrop registration did not succeed
System.InvalidOperationException: DragDrop registration did not succeed

And long stack trace after that.
Important to say, that when I run Installer function from test project the error did not occur and all work fine. Error occurs only when I run the .msi package.

Any suggestions?

like image 713
rodnower Avatar asked Apr 17 '10 18:04

rodnower


1 Answers

Do you have any multi threads causing this issue. If so, find them and force them to STA

trd = New Threading.Thread(AddressOf ThreadTask)  trd.IsBackground = True trd.SetApartmentState(ApartmentState.STA) 
like image 81
Eddy Jawed Avatar answered Oct 11 '22 14:10

Eddy Jawed