Hi,
I am having a problem building a custom activity with the latest SDK.
I started building it on 9.0. Have some issues so decided to update to latest version.
Now I get this error when runing the activity.
4/9/2014 9:55:00 AM||System.InvalidCastException: [A]Laserfiche.RepositoryAccess.Session cannot be cast to [B]Laserfiche.RepositoryAccess.Session. Type A originates from 'Laserfiche.RepositoryAccess, Version=8.2.0.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6' in the context 'Default' at location 'C:\Windows\assembly\GAC_MSIL\Laserfiche.RepositoryAccess\8.2.0.0__3f98b3eaee6c16a6\Laserfiche.RepositoryAccess.dll'. Type B originates from 'Laserfiche.RepositoryAccess, Version=9.1.0.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6' in the context 'Default' at location 'C:\Windows\Microsoft.Net\assembly\GAC_MSIL\Laserfiche.RepositoryAccess\v4.0_9.1.0.0__3f98b3eaee6c16a6\Laserfiche.RepositoryAccess.dll'. at PDF_To_Tiff_Activity.PDFtoTIFF.Execute(ActivityExecutionContext executionContext) in C:\Users\gianfrancop\Documents\Visual Studio 2010\Projects\PDF_To_Tiff_Activity\PDF_To_Tiff_Activity\PDFtoTIFF.cs:line 62
Seems that in the reference there is some ReposirotyAccess version 8.2.
I try remove all laserfiche references and add them one by one. And still the same.
The problem is when the Session is created:
protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { try { using (ConnectionWrapper wrapper = executionContext.OpenConnectionRA()) { string sTempTIFF = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".tiff"; string sTempPDF = System.IO.Path.GetTempPath() + Guid.NewGuid().ToString() + ".pdf"; Laserfiche.RepositoryAccess.Session session = (Laserfiche.RepositoryAccess.Session)wrapper.Connection;
There is a very similar problem on https://answers.laserfiche.com/questions/52535/assuming-assembly-reference-in-SDK-Script-Activity
But I couldn't figure out a solution for me.
Any help will be appreciated.
Thanks!
Gian