Just another ignorant weirdo from Antwerp, Belgium
trying to make sense out of it all
We were quite amazed recently when we discovered the root cause of the following error message:
System.DllNotFoundException: Unable to load DLL 'oramts.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E).
We were getting this error on our application servers (not on our developer workstations) when using distributed transactions from .NET 2.0 with Oracle 9i (coordinated by MSDTC).
It turns out that the version of oramts.dll (which provides DTC transaction support for Oracle) as installed by the Oracle 9i Release 2 CD is a debug build, rather than a release build. (Let that sink in for a moment: Oracle is shipping debug builds of their software...). As you can see in the following screenshot of the dll in DependencyWalker, this debug build has a dependency on MSVCRTD.DLL, which is a debug build of the Microsoft C Runtime Library:
This debug version is installed on our workstations (because we have Visual Studio installed), but of course not on our application servers, causing the loader exception shown above. Copying the MSVCRTD.DLL file to the System32 directory solved the problem - temporarily of course (you don't want to be installing debug builds all over the application servers because of an Oracle dll).
Anyway, if you suffer from this issue as well, you can get a patch from Oracle containing the proper dll. You can easily tell the difference by looking at the file size: 137 KB for the release build versus 192 KB for the debug build.