1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Microsoft.Office.Interop.Excel, Version= 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=, 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:

    <add assembly="Microsoft.Office.Interop.Excel, Version=, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
            <add assembly="office, Version=, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
            <add assembly="Microsoft.Vbe.Interop, Version=, 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


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


    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)
    And the following links I never loaded, but thought I would mention:
  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.


    Thanks all for your help.

Share This Page

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