Compiling a DLL created using the .NET API as a 64-bit Dll may result in it not being found by Sage CRM.


On calling the DLL, the following error message may be displayed:

File not found: C:\Program Files (x86)\Sage\CRM\CRM\CustomDotNet\CustomDotNet.dll
An error has occurred in a CRM .net customisation. Please contact your vendor to resolve.


Assuming the DLL exists in the directory, the error may be caused by the DLL being built as an x64 DLL. It must be built as an x86 DLL to work with Sage CRM.

The bitness settings are available in Visual Studio under Project > Properties > Build. Normally, selecting the Any CPU option will work successfully, but if a project contains any x64 assemblies, using this setting will build it as a 64-bit DLL.