Assembly error for adding COM-MSWord 11.0 reference to application..

Posted by Susantaown under ASP.NET on 12/19/2009 | Views : 1793 | Status : [Member] | Replies : 1
I want to read one .doc file which is present in some folder in my application..
for this :
1: I added reference com component of Microsoft word 11.0
2: <add assembly="Microsoft.Office.Interop.Word, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

so in my local machine its working fine without any error but
whenever i uploaded my application to server its showing error

"Could not load file or assembly 'Microsoft.Office.Interop.Word, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified."

So any quick solution for this??
My application
ASP.Net +C#.Net.



Posted by: Vuyiswamb on: 12/21/2009 [Member] [MVP] [Administrator] NotApplicable

Good Morning Susant

This basically means , that you have added the Reference to the assemby but in your bin folder there is no Assemly. To resolve this you need to do the Following. If you are using Visual Studio 2008 in your c:\ drive , go to the Following path

C:\Program Files (x86)\Microsoft Visual Studio 9.0\Visual Studio Tools for Office\PIA\Office11\

and locate the File Microsoft.Office.Interop.Word.DLL

copy this File here and paste it in the bin folder of your project in the Production site and your problem will be gone. copy this file to the development side too so that this will not be a problem again.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Susantaown, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response