问题
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 laptot, with .Net 4.0 and .Net 4.5 there is an Exception when i try to open this Dialog :

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 ?
Thanks a lot,
Best regards,
Nixeus
回答1:
You get these libraries files from Nuget source.
https://nuget.org/packages/DataConnectionDialog/1.2
来源:https://stackoverflow.com/questions/17469960/unable-to-load-microsoft-data-connectionui-for-dataconnectiondialog-use