Wednesday, January 12, 2011

Integration Manager 2010 Error: Could not load file or assembly Interop.MSScriptControl

I recently fielded a question on Experts Exchange where a user was receiving an error trying to run an integration in Integration Manager 2010:

Could not load file or assembly 'Interop.MSScriptControl, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

The same integration worked okay on Integration Manager 10, and it also works fine with Integration Manager 2010 on a different computer.

I wasn't able to find anything in the Knowledge Base or Google about this specific error, so I had to dig around.  At first I got distracted by some references to MSScript.ocx, but it turns out that this error is completely unrelated to the OCX file, as it relates to the Interop.MSScriptControl.dll file, which is normally installed in the Integration Manager 2010 application directory.

Once I found this file on my server, I felt that I was getting closer, but I still wasn't sure why the error was occurring on the client's computer.  I first checked to see if there were any references to the file in the registry, but there were none.  I then checked the .NET 1.1 and 2.0 Global Assembly Cache lists, but didn't see any reference to the file there either.  Given this, my only guess was that the file was probably missing from the Integration Manager application directory.

I asked the user to make sure the file was present in the Integration Manager application directory, and sure enough, it was missing.  Once she copied the file from another GP 2010 machine, the integration ran fine.

She decided to check all of the other Integration Manager files and found that the Interop.ADOX.dll file was also missing, so she copied that one over as well.

I'm assuming this is a rare, random issue where the files were not installed properly, but in case anyone else runs into it, fortunately there is a simple fix!

Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified Professional.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

No comments: