WHEN
When adding the reference to the script task to use the Interop.ADOX library in VS2008 or SQL Server Business Intelligence Development Studio
Even when code builds correctly on the script view, getting the following error when running the build process:
Error: 0x1 at Access DB: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Interop.ADOX, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'Interop.ADOX, Version=2.8.0.0, Culture=neutral, PublicKeyToken=null'
If logging is enabled, following messages will appear prior to failure (depending on whether you are running a 32 or 64 bit solution):
32 bit
LOG: Attempting download of new URL file:///c:/Program Files (x86)/Microsoft SQL Server/100/DTS/binn/Interop.ADOX.DLL.
LOG: Attempting download of new URL file:///c:/Program Files (x86)/Microsoft SQL Server/100/DTS/binn/Interop.ADOX/Interop.ADOX.DLL.
LOG: Attempting download of new URL file:///c:/Program Files (x86)/Microsoft SQL Server/100/DTS/binn/Interop.ADOX.EXE.
LOG: Attempting download of new URL file:///c:/Program Files (x86)/Microsoft SQL Server/100/DTS/binn/Interop.ADOX/Interop.ADOX.EXE.
64 bit
LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/Interop.ADOX.DLL.
LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/Interop.ADOX/Interop.ADOX.DLL.
LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/Interop.ADOX.EXE.
LOG: Attempting download of new URL file:///c:/Program Files/Microsoft SQL Server/100/DTS/binn/Interop.ADOX/Interop.ADOX.EXE.
FIX
Copy the Interop.ADOX reference file (you can retrieve the value by checking the properties of the reference in the script view) to the following files depending on the solution:

C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn
C:\Program Files\Microsoft SQL Server\100\DTS\Binn
You may have to run the solution as administrator as well.
Hope this helps
HEADACHE RANK
Reaching the solution took several hours as normally logging is not enabled and the error is so generic, web searching doesn't help.
No comments:
Post a Comment