Getting compliation error while adding TDAPIOLELIB.dll and using QCResourcefolder factory in UFT API
After adding a reference to API script OTA Com Type Library to connect QC from API test scripts , giving errors (Could not load type 'TDAPIOLELib.ITDConnection11' from assembly 'Interop.TDAPIOLELib, Version=184.108.40.206, Culture=neutral, PublicKeyToken=null'.)
We would like to develop some custom activites of Resource Download from QC and while using TDAPIOLELIb.dll its giving compilation errors as its not recognizing QCResourceFolderFactory and TDConnection etc.,
Please let me know.
This should be a known problem and you may find the detailed information about it from here:
If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution.
If you are satisfied with anyone’s response please remember to give them a KUDOS by clicking on the STAR at the bottom left of the post and show your appreciation
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
This is a known interoperability issue related to the .Net framework version used by UFT (4.0).
Alternatively, you can use "TDConnecctionClass" class instead of "TDConnection" class:
TDConnectionClass qcConn = new TDConnectionClass();
- Use "Interop.TDAPIOLELib.dll" NET assembly reference, instead of "OTA" COM reference:
- Go to test's "Solution Explorer > References"
- Remove any/all TDAPIOLELib references listed (right click on item, and select "Remove/Delete")
- Right click on "Solution Explorer > References", then select "Add references"
- Access ".NET Assembly Browser" tab
- Locate/Select: <UFT>\bin\Interop.TDAPIOLELib.dll