7

I am unable to add the reference of xmogrt.dll in my content delivery web application .it throws the error –

“A Reference to xmogrt.dll could not be added. No Type libraries were found in the component”.

As per my knowledge, if any dll is unmanaged and is not COM (does not have a Type Library). We can copy the dll manually into the execution directory. So if I do so , I can able to build my application but it throws below error in the below code –

Code –

ItemSchemaCriteria isnews = new ItemSchemaCriteria(137);

Error-

“An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B”

This error creates a doubt in my head that I am not using 64 bit dll in the application. For this I removed and again added the dll from my 64 bit Tridion installation. Here my questions are below –

(1) Is it not possible to add reference of xmogrt.dll from visual studio and to copy this dll in the bin directory is fine?

(2) How can I verify the bit of xmogrt.dll? For this I tried “pedeconstructor_0.1_amd64” tool but no luck.

Please also guide me to troubleshoot this error.

2 Answers 2

6
  1. Should be fine.
  2. Check that the File version of that dll is 3.6.168.0 and then check in what case you are: a. file size=900 KB means 32 bit; b. file size=1,09 MB means 64 bit.

At any case, also check in the event viewer if you see any strange messages when your app loads (check the Application logs but also the Tridion logs).

Hope this helps.

5
  • for my Dll ,size is 1.59 MB and file version is 4.0.0.0. Again a new twist in head
    – user395
    Apr 22, 2013 at 14:54
  • This is the 64 bit DLL for the 2011/2011SP1 version. You tagged your question with 2013. What version are you trying to test with? Apr 22, 2013 at 15:30
  • yes,I wrongly mentioned the version 2013.Let me remove it. Thanks for answering. Could you please help me to get the resolution for error "“An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B”. if Dll is 64 bit , what other reasons are blocking me here
    – user395
    Apr 23, 2013 at 6:01
  • Ok, so we have 64 bit xmogrt.dll. Then you first need to make sure that the Tridion dll's that you are using are also 64 bit. Then you need to make sure that you're compiling your dll's to 64 bit. Then you need to make sure that the app pool of the used site is 64 bit. At the end you need to make sure that the java version that Tridion tries to load is 64 bit. If all these are correct, you can check the event viewer to see if you have strange messages. Apr 23, 2013 at 7:40
  • Thanks Daneil, for your valuable steps , app pool was not 64 bit. Issue has been fixed.
    – user395
    Apr 24, 2013 at 5:47
2

Below are the answers to your question:

  1. You can only add references to those DLLs which are compiled into MSIL. The xmogrt.dll does not qualify for that and hence you can not add reference to it in your VS project. alternatively, you may write a post-build event in your Visual Studio project to copy it from a specific directory to the project execution bin directory, or you may choose to copy it manually depending on your specific deployment strategy.
  2. The simplest to check for 32 bit or 64 bit API is to go to your SDL Tridion installation CD and get it from specific Folder for x86 and x64 PE files.

Looking into the size will never be a benchmark as it could show minor differences in the size for the same PE file on different Operating System. As a benchmark you can at max take this fact in consideration that 32-bit dll will be smaller in size as compared 64-bit dll.

CAUTION: kindly check if you have manually put up any update/hotfixes and if it has also updated the xmogrt dll. This might be another reason why you should not rely on the size of the dll to identify its target OS.

For resolution ensure following:

  1. Go to IIS -> Application Pool -> Advance Settings -> Enable 32-bit Assemblies is set to FALSE
  2. If you have not put up any specific hot fix, copy the 64-bit version of the dll from the installation disk and paste it in your content delivery web application again - just to double sure during copy-pasting the dll did not get corrupt
  3. Ensure everything is 64-bit - the xmogrt.dll, other content delivery dlls, jdk etc.
  4. Re-start IIS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.