MSI cant load .dll Error: 0x8007007E wix installer


I am trying do this in custom action wix:

string sqlConnectionString = @"Server=MyInstanceName;Trusted_Connection=True;MultipleActiveResultSets=true";
string script = "...";
Microsoft.Data.SqlClient.SqlConnection conn = new Microsoft.Data.SqlClient.SqlConnection(sqlConnectionString);
Server server = new Server(new ServerConnection(conn));

It work in console app but when I run msi it throw:

Failed to connect to server MyInstanceName. Could not load DLL 'Microsoft.Data.SqlClient.SNI.x86.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

When I use Orca I dont see this .dll.

How can i repair that?

asked on Stack Overflow Jul 30, 2020 by Silny ToJa • edited Jul 30, 2020 by Silny ToJa

1 Answer


This is a library problem Microsoft.SqlServer.Server. I changed library to write sql command on System.Data.SqlClient.

answered on Stack Overflow Aug 10, 2020 by Silny ToJa • edited Aug 10, 2020 by Silny ToJa

User contributions licensed under CC BY-SA 3.0