OpenXml Error: Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

Last Reply on Jul 06, 2015 03:29 PM By abhi619

Posted on Jul 06, 2015 06:31 AM

I am getting this message :Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) 

 

but when i tried to add reference for documentformat.openxml,an error occur with message that closedxml is already added in the solution which is higher version of it. SO not able to use this method. HELP ME. Thanks

Posted on Jul 06, 2015 06:31 AM

You need to download and install OpenXml


Posted on Jul 06, 2015 06:40 AM

I already did that but still getting this error :

Error54Assembly 'ClosedXML, Version=0.76.0.0, Culture=neutral, PublicKeyToken=fd1eb21b62ae805b' uses 'DocumentFormat.OpenXml, Version=2.5.5631.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'F:\abhishek\GSSAIR\New Source\GSSAIR1\GSSAIR\GSSAIR\bin\ClosedXML.dllGSSAIR


Posted on Jul 06, 2015 06:50 AM

I got the answer sir. Its the version problem. Your post has openxml sdk 2.0 link and i was trying it with that version thats why its creating problem. but with version 2.5 it works fine.  Sir, is it necessary to install same OPENXML 2.5 SDK on my server too?


Posted on Jul 06, 2015 06:56 AM

You can try without installing. But if it does not then you will have to

 


Posted on Jul 06, 2015 03:29 PM

Thank you so much sir for your support. It helped me alot..

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html