Click here to Skip to main content
13,044,428 members (114,016 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Could not load file or assembly 'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Posted 4-Dec-12 20:57pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

I found this to be an issue when the reference was in a class library included as a reference in the Web Application Project being published. Even when CopyLocal was changed to True the file was not copied to /bin when publishing.

I added the reference to the Web Application Project being published as well, even though it isn't used there, set CopyLocal to True there as well and the file was included when publishing.

Other DLLs copied fine when only referenced in the class library. Not sure why this one is different.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

If More than one user working on the same project and both of them Moving the bin to server(where the application is Host) then this issue may happen due to vesion mismatch
of the Third party ddl of the system of the develpoers .

So you both need to move all the third party dll along with the application dll to server to resolve the Issue.

If you are facing the Issue at you local system then remove the third party ddl and add it once again and rebuild the solution

keep smiling :):):) happy coding:)
ShailendraPatel 6-Dec-12 2:55am
yes u r right i have solve this problem yesterday.
By the way thanks a lot for reply.
Tadit Dash 7-Dec-12 5:31am
My +5... Awesome explanation.
IpsitaMishra 7-Dec-12 6:00am
thanks a lot :)
Tadit Dash 7-Dec-12 6:05am
Most welcome... Anytime.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Your application must compiled with Open XML SDK 2.0 for Microsoft Office[^]
honda15i 11-Jun-14 3:06am
SDK Installation solved my problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170713.1 | Last Updated 2 May 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100