You are viewing limited content. For full access, please sign in.

Question

Question

"DocumentImporter" does not work correctly with the SDK Version 10 and perfectly in version 9.

asked on November 8, 2016

Hi,

On the following example, version 10 I have an error message.
"Method not found: 'Void Laserfiche.DocumentServices.DocumentImporter.set_Document (Laserfiche.RepositoryAccess.DocumentInfo)'."

This error occurs when using the following statement:
DocumentImporter docimport DocumentImporter = new ();
DocumentInfo docinfo = Document.GetDocumentInfo (nID, _Sess);
docimport.Document = docinfo; // ERROR relevant here.

With version 9 SDK I have no problem and everything is perfect.
Following few lines of code used.

 if (sFile != string.Empty)
        {
               DocumentImporter docimport = new DocumentImporter();
               DocumentInfo docinfo = Document.GetDocumentInfo(nID, _Sess);
               docimport.Document = docinfo;
               docimport.ImportEdoc(sApplication, sFile);
                docinfo.Save();                               
             }

 

0 0

Answer

SELECTED ANSWER
replied on November 8, 2016 Show version history

The code works fine for me with SDK 10.  I think Miruna is right that your project might have an RA reference and a DS reference from different versions of the SDK.  It can be tricky to tell in the Visual Studio interface, you might want to examine the csproj file in a text editor.  And VS will sometimes use whatever version it finds, regardless of the "hint path", so you might try clearing out the bin directory.  Finally, you might try starting a new project with fresh references to see how that behaves.

0 0

Replies

replied on November 8, 2016

It looks like you're using mismatched versions or RepositoryAccess and DocumentServices. Please double-check your project's references.

0 0
replied on November 8, 2016

I checked that point. Anyway compiling with VisualStudio 2015 produced an error when using different versions of ddI.

0 0
SELECTED ANSWER
replied on November 8, 2016 Show version history

The code works fine for me with SDK 10.  I think Miruna is right that your project might have an RA reference and a DS reference from different versions of the SDK.  It can be tricky to tell in the Visual Studio interface, you might want to examine the csproj file in a text editor.  And VS will sometimes use whatever version it finds, regardless of the "hint path", so you might try clearing out the bin directory.  Finally, you might try starting a new project with fresh references to see how that behaves.

0 0
replied on November 8, 2016

I cleaned and rebuilt the solution with Visual Studio 2010 and the problem was resolved.
Thank you for your help.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.