?
Solved

C# using DtSearch API

Posted on 2010-08-12
5
Medium Priority
?
1,605 Views
Last Modified: 2013-12-17
I'm deploying a C# application that uses DtSearch on a number of different machines.  I'm finding that when the app is built with dtsearchNetApi.dll, it runs successfully on Windows XP machines but not Windows 2003 machines.  When the app is built with dtsearchNetApi2.dll, it runs on Windows 2003 machines but not Windows XP machines.  The failure occurs when trying to execute a method on an instance of a class that uses dtSearch.Engine ("using dtSearch.Engine;").  So something like this:

IndexReader ir = new IndexReader(lstItems);  // OK
ir.ReadIndexes();  // Fails

System.IO.FileNotFoundException: The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The app is deployed with ClickOnce, and either dtsearchNetApi.dll or dtsearchNetApi2.dll is included in the Application Files on the Publish tab. The main dtSearch library - dten600.dll - is registered on all machines.
0
Comment
Question by:jkavx
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
5 Comments
 
LVL 23

Accepted Solution

by:
Stacy Spear earned 1500 total points
ID: 33430013
You probably need to include the file (copy the dll) into your solution and set it to publish. I'm thinking that even unregistered, if the dll is in the same directory as the executable, it will see it.
0
 

Author Comment

by:jkavx
ID: 33430411
I've tried referencing dten600.dll.  This builds interop.dtengine.dll into the solution.  But it doesn't help.  
0
 

Author Comment

by:jkavx
ID: 33434919
If I put msvcr71.dll in the directory of the executable, I can use dtsearchNetApi.dll on a Windows 2003 machine.  This link "http://support.dtsearch.com/dts0197.htm" includes this:

"You may also be missing one or more of the Microsoft runtime library DLLs.  For dtSearchNetApi.dll, msvcr71.dll is required.  For dtSearchNetApi2.dll the MFC 8.0 and CRT 8.0 merge modules are required."

But using ClickOnce for deployment, I'm not sure how to include this dll in the deployment package.  I've put it in the compile directory, and included it in the project (Show all files in the solution explorer and right click on include).  Then I set the properties of the included dll to "Build Action:  None and CopyToOutputDirectory:  CopyAlways."  But on the Publish tab, which I click on Application Files, the dll does not appear.  Am I missing a step here, or not setting the properties correctly?
0
 

Author Comment

by:jkavx
ID: 33451260
I find that I can include the dll by:  Project\Add Existing Item, select the dll that was added, and change CopytoOutputDirectory to CopyAlways (Build Action will be set to Content).
0
 

Author Closing Comment

by:jkavx
ID: 33451266
The dten600.dll was not the issue.  Msvcr71.dll needed to be added for dtsearchNetApi.dll to work on the Windows 2003 server.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question