Microsoft.Office.Interop.Excel, Version=14.0.0.0 issue

Discussion in 'Software' started by be0, Jul 15, 2010.

  1. be0

    be0 Corporal

    Hello All,

    Created a website in which I used Microsoft.Office.Interop.Excel using Visual Studio 2008 professional. I ran in on Windows XP 32-bit with Office 2007.

    Now I got a Windows 7 64bit with Office 2010 installed. I have several webpages that basically export values into Excel. When I do a publish from my Workstation to my Windows 2003 web server with Excel 2003 installed on it I get the following error message:

    Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

    Any ideas?
    Now here is what I did. I picked from my GAC references version 11. of office. (I have 2 versions that I get to pick 11 and 12 but neither of them works for me and gives me the error.)

    I tried editing my web.config file by adding this code to it with no luck:

    Code:
    <add assembly="Microsoft.Office.Interop.Excel, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
            <add assembly="office, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
            <add assembly="Microsoft.Vbe.Interop, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
            <add assembly="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    Thanks for the help!
     
  2. PC-XT

    PC-XT Master Sergeant

    I searched for "located assembly's manifest definition does not match the assembly reference" and "HRESULT: 0x80131040" and found basically the same list of several sites that talked about it. They seem to go into detail about their own projects, but one was marked solved, and said
    from http://runtingsproper.blogspot.com/2010/04/solved-located-assemblys-manifest.html
    It apparently happens with version changes.
     
  3. be0

    be0 Corporal

    Alright.

    yesterday I found that and I did it. I picked the appropriate DLs which were:

    Microsoft.Office.Interop.Excel.dll
    Microsoft.Office.Interop.Excel.dll.refresh
    Microsoft.Office.Interop.Excel.xml
    Microsoft.Vbe.Interop.dll
    office.dll
    office.xml

    Can you point me out to the post where you found that answer?
     
  4. PC-XT

    PC-XT Master Sergeant

  5. be0

    be0 Corporal

    lol. Says exactly what you said.

    Hmmmm... this is turning out to be a pain...
     
  6. PC-XT

    PC-XT Master Sergeant

    I just found the following quote from http://stackoverflow.com/questions/...nition-does-not-match-the-assembly-reference:
    (The quote has links in it that I didn't include.) The page also gives other possible causes, like dll's referencing a nonexistant dll, or other stuff.

    Other links I found on Google, but haven't fully read are:
    http://mrpmorris.blogspot.com/2007/08/located-assemblys-manifest-definition.html said to use a weak name rather than a strong one.
    http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_22851923.html (scroll to the bottom for troubleshooting ideas)
    http://social.msdn.microsoft.com/Fo...k/thread/612fb9a8-e90e-4463-b2da-93d64858eece
    http://social.msdn.microsoft.com/forums/en-US/netfxbcl/thread/b3ac738a-fc72-4ed2-a039-e8d365a5fb3e
    http://social.msdn.microsoft.com/Forums/en-US/vbide/thread/7f45b264-01d2-49d7-ac30-e6315c3c5a2d
    And the following links I never loaded, but thought I would mention:
    http://forums.asp.net/p/1191303/2051870.aspx
    http://forums.asp.net/p/1307394/2566065.aspx
    http://forums.asp.net/p/934184/1102625.aspx
     
  7. be0

    be0 Corporal

    Unfortunately there is only one solution that I was able to come to and that is by installing MS Office 2010 on my Web Server. :(

    That is a bummer.
    I tried all of the suggestions here and the ones in the below post.

    http://forums.asp.net/p/1574881/3984336.aspx#3984336

    Thanks all for your help.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds