Walter Fabio Simoni
Walter Fabio Simoni

Reputation: 5729

Unable to load 'Microsoft.Data.ConnectionUI" for DataConnectionDialog use

I created an application in C#, .Net 4.0. In this application i need to show a DataConnectionDialog for accessing DataBase.

I use this code :

 DataConnectionDialog BDdialog = new DataConnectionDialog();
 DataSource.AddStandardDataSources(BDdialog);
 BDdialog.SelectedDataSource = DataSource.OdbcDataSource;
 BDdialog.SelectedDataProvider = DataProvider.OdbcDataProvider;
 DataConnectionDialog.Show(BDdialog);

On my laptop, the code works fine, but on another laptop, with .Net 4.0 and .Net 4.5 there is an Exception when I try to open this dialog :

enter image description here

Nevertheless, I added these DLL in the same directory of my exe :

Microsoft.Data.ConnectionUI.Dialog.dll
Microsoft.Data.ConnectionUI.Dialog.resources.dll
Microsoft.Data.ConnectionUI.dll

Anyone could help me? How correcting this error please?

Upvotes: 1

Views: 5369

Answers (1)

vendettamit
vendettamit

Reputation: 14687

You get these libraries files from Nuget source.

https://nuget.org/packages/DataConnectionDialog/1.2

Upvotes: 2

Related Questions