You are here: Overviews > Installing the dtSearch Engine > .NET 2-4.x MFC and CRT dependencies
Close
dtSearch Text Retrieval Engine Programmer's Reference
.NET 2-4.x MFC and CRT dependencies

How to install MFC and CRT components required by the dtSearch Engine's .NET interface

The dtSearch .NET API wrapper for .NET 4.x (dtSearchNetApi4.dll) requires MFC and CRT components included with Visual Studio. To install these components, you can use Microsoft redistributable installers vc_redist.x86.exe and vc_redist.x64.exe. vc_redist.x86.exe is required for 32-bit applications. vc_redist.x64.exe is required for 64-bit applications. 

Use of incorrect versions of a vc_redist*.exe will result in an "application configuration is incorrect" or "could not load file or assembly" exception when you try to run your application. 

The dtSearch .NET Standard API wrapper for .NET versions 5 and later, dtSearchNetStdApi.dll, does not require these MFC and CRT components. 

Custom builds 

The source code to the dtSearch Engine .NET API wrapper is included with the dtSearch Engine, in the C:\Program Files\dtSearch Developer\examples\cpp folder. Therefore, you can build your own version of the API wrapper by recompiling the project with Visual Studio. In this case, the required vc_redist_*.exe file would be the ones that correspond to your version of Visual Studio. 

Links to the most current vc_redist*.exe files are posted on the Microsoft web site here: The latest supported Visual C++ downloads

Why the components are required

Unfortunately there is no way in Visual Studio to build dtSearchNetApi4.dll so it does not depend on the MFC and CRT DLLs. Because it is a mixed-mode DLL (so it can interface with both .NET 4.x and the dtSearch Engine's C++ API), it has to dynamically link both the MFC and CRT DLLs.

Copyright (c) 1995-2025 dtSearch Corp. All rights reserved.