Currently I am in the process of developing a prototype of a WCF service that needs to use a third party COM dll and call a procedure that returns some data in XML format.
What I've done so far:
Created an interop dll for this dll.
Added the interop dll to the GAC.
Created a windows for application to test this concept, and is works perfectly.
Created a WCF service.
Added code to the WCF Service that reads a simple text file.
Created an external content type using SharePoint Desinger 2010.
Created an external list in SharePoint.
So far so good. The text file contains comma-seperated text values, which are displayed in the list perferctly.
Now I want to change the WCF service to call the interop assembly dll in the GAC instead of reading the text file. The code is used for this is as follows:
Assembly asm = Assembly.Load("Interop.MyDllName, Version=188.8.131.52, Culture=neutral, PublicKeyToken=25579607a82853d9");
However, this line raises the following Exception:
System.IO.FileNotFoundException was unhandled by user code
Message=Could not load file or assembly 'Interop.MyDll, Version=184.108.40.206, Culture=neutral, PublicKeyToken=25579607a82853d9' or one of its dependencies. The system cannot find the file specified.
View Complete Post