I have build a custom .Net Data Provider and am in the process of trying to deploy it so that I can use it in SQL Integration Services (SSIS). The issue that I am running into is that I am referencing unmanaged methods in a Win32 DLL. In order for my Data Provider to work in SSIS, I have to sign my managed provider DLL and deploy it to the Global Assembly Cache (GAC). When I try to use my Data Provider in Business Intelligence Development Studio (BIDS), it gives me the following error:
TITLE: Connection Manager
------------------------------
Test connection failed because of an error in initializing provider. Unable to load DLL 'RTB32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
------------------------------
BUTTONS:
OK
------------------------------
How/where am I supposed to deploy the unmanaged code along with my provider so that it works? Things I have tried:
- Embedding the DLL’s into the managed DLL.
- Adding the unmanaged DLL’s to the GAC.
- Adding the location of the unmanaged DLL’s to the PATH System Variable.
- Putting the unmanaged DLL’s into the System32 directory (out of desperation)
Side Note: When I use my Data Provider in a Forms app with the unmanaged and managed assemblies in the same directory, everything works without any issues.
Side Note 2: I want this Data Provider to work in more places that just SSIS. I also want it to work as a Linked Server in SQL Server, as a Data Source in SSRS, as a Data Source for Visual Studio, in the Entity Framework, etc. I would prefer to put the DLL’s in one place that will work for all of these.
Thanks!
Chris
If this is a 32-bit app running on a 64-bit OS, then you will need to install the DLLs in the
C:\Windows\SysWOW64directory.Otherwise, they should go into
C:\Windows\System32.In both cases, obviously, you would need to use the appropriate drive and directory for the machine you are installing on.