Solved

Interop.Word error

Posted on 2004-09-16
16
408 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:Tom Knowlton
[X]
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
16 Comments
 
LVL 5

Author Comment

by:Tom 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:Tom 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Author Comment

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

Author Comment

by:Tom 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:Tom 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:Tom 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:Tom 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:Tom 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:Tom Knowlton
ID: 12107187
The Learned One:

The version of Word is 2000.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

762 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