Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Interop.Word error

Posted on 2004-09-16
16
403 Views
Last Modified: 2012-06-27
The following exception is being raised in my program.  How can I fix this?

System.IO.FileLoadException: The located assembly's manifest definition with name 'Interop.Word' does not match the assembly reference.
File name: "Interop.Word"
   at BuyersFund.FaxRequestWindowsService.ServiceProcessRequests.Bln_PrintAllFiles(String StrFileName, String network_printer)
   at BuyersFund.FaxRequestWindowsService.ServiceProcessRequests.PrintDocToNetworkPrinter(String TempFullDocPath, String PrinterName)

Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = c:\puball\
LOG: Initial PrivatePath = NULL
Calling assembly : FaxRequestWindowsService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///c:/puball/Interop.Word.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN
0
Comment
Question by:knowlton
16 Comments
 
LVL 5

Author Comment

by:knowlton
ID: 12080122
There is a lot about this error message I do not understand.

Perhaps if I pick it apart one line at a time:



System.IO.FileLoadException:
The located assembly's manifest definition with name 'Interop.Word' does not match the assembly reference.
File name: "Interop.Word"
   at BuyersFund.FaxRequestWindowsService.ServiceProcessRequests.Bln_PrintAllFiles(String StrFileName, String network_printer)
   at BuyersFund.FaxRequestWindowsService.ServiceProcessRequests.PrintDocToNetworkPrinter(String TempFullDocPath, String PrinterName)


In the above error message, it says "the located assembly's manifest definition with name 'Interop.Word' does not match the assembly reference.

HOW is the assembly being located and it's manifest defnition being read?

WHAT is determining that that this manifest definition does not match the assembly reference?

WHAT is the assembly reference???????


I am so sooooo lost.....someone give me a clue.
0
 
LVL 5

Author Comment

by:knowlton
ID: 12080163
Fusion log follows:
=== Pre-bind state information ===
LOG: DisplayName = Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = c:\puball\
LOG: Initial PrivatePath = NULL
Calling assembly : FaxRequestWindowsService, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
LOG: Attempting download of new URL file:///c:/puball/Interop.Word.DLL.
WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN



What is a fusion log?  Why is it called fusion?


LOG: Appbase = c:\puball\


I know what the puball folder is.      It is a folder that I made, into which I dump all of my solution's .EXE and .DLL files.


>>>>>>>>>LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).


What POLICY is being referenced here?  Can I look at the POLICY?  Where is it?   What does it look like?  Should I change the POLICY, and how do I do it?



>>>>>>>>>LOG: Post-policy reference: Interop.Word, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null


What is the significance of a Post-policy reference?  Does that mean there is a PRE Policy reference as well?



>>>>>>>>>>>>>LOG: Attempting download of new URL file:///c:/puball/Interop.Word.DLL.


Why is a download of this file being attempted and the file is coming FROM where and going TO WHAT FOLDER?


>>>>>>>>>>WRN: Comparing the assembly name resulted in the mismatch: PUBLIC KEY TOKEN


Okay, fine......why does this matter and how can I tell there is a mismatch?????
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12080294
Was the Interop.Word generated when you added a COM reference to the Word type library?

Bob
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 5

Author Comment

by:knowlton
ID: 12080304
Yes it was....how did you know that?
0
 
LVL 5

Author Comment

by:knowlton
ID: 12080330
Here is a screen shot of the WORD dll I am picking that is causing all the trouble:

http://www.robotzgame.com/junk/Word_under_COM.gif
0
 
LVL 5

Author Comment

by:knowlton
ID: 12080750
Hello?
0
 
LVL 11

Accepted Solution

by:
Agarici earned 500 total points
ID: 12082020
the exception is thrown because the assembly found in appbase does not match the reference in your app - it has a strong name, while the reference does not specify a strong name for that reference.
try to remove the reference, add it again and rebuild the project.

hth.
A.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12083602
I am psychic I guess.  Actually, that is the way that most people do it, and I just guessed :)

What version of Word are you using here?  I am guessing Word 2000.  If it is Word XP, though, there are Primary Interoperability Assemblies for XP that are better than auto-generated COM wrapper classes.

Bob
0
 
LVL 10

Expert Comment

by:eternal_21
ID: 12085771
What is a Fusion log?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12085787
Debugging Assembly Loading Failures
http://blogs.msdn.com/suzcook/archive/2003/05/29/57120.aspx

Bob
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 12085921
0
 
LVL 5

Expert Comment

by:tomasX2
ID: 12087177
Is this happening on you dev machine or a machine that you have installed a msi of your app?
0
 
LVL 5

Author Comment

by:knowlton
ID: 12104555
Expert tomasX2:

<quote>
 Is this happening on you dev machine or a machine that you have installed a msi of your app?
</quote>

This is happening on our production server.
0
 
LVL 5

Author Comment

by:knowlton
ID: 12104574
Expert Agarici:

<quote>
the exception is thrown because the assembly found in appbase does not match the reference in your app - it has a strong name, while the reference does not specify a strong name for that reference.
try to remove the reference, add it again and rebuild the project.
</quote>

I'll try this now....
0
 
LVL 5

Author Comment

by:knowlton
ID: 12107181
Expert Agarici:

I did tried deleting and re-establishing the reference and still the same problem.
0
 
LVL 5

Author Comment

by:knowlton
ID: 12107187
The Learned One:

The version of Word is 2000.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# guarantee sql connection close 6 50
Simple Injector with Web Service 4 54
Hey!! 5 37
VB.NET 2008 - SQL Timeout 9 34
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question