简体   繁体   中英

.NET Word Interop works on Windows 7 but not on Server 2008

I am a bit lost and need some help;) We have got an app at work (.NET 4.0 / Windows Forms app) that creates Word templates for users using the word interop assemblies.

Everything is working fine on a 64bit Windows 7 machine. I should add that our app is running as 64 bit (compiled as Any CPU) and Office is a 32 bit version, but that works fine on the Windows 7 64 bit machine using Office 2010 and the corresponding PIAs (included via embedded Interop Types).

However, when we run this app on a Windows Server 2008, which is also needed, we get the error message that the Word Interop assembly isn't found. It's also a 64 bit OS, and also Office 2010 with 32 bit. The app is run interactive so no windows service etc.

Any ideas as to what the problem might be are very much appreciated.

Thanks all!

Cheers, Jason

The error indicated the the Office primary interop assemblies (PIA) are not installed on your server. You have two options:

  • Start the Office setup, choose to change the current installation and make sure that the .NET Programmability Support option is selected.
  • Deploy the interop assemblies with your application (put in next to your executable).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM