Missing Namespace with Office
-
07-10-2020 - |
Question
I am trying to develop a custom solution that makes use of the Word Automation Service but I keep running into a snag.
The reference article I am following says that I need to make use of the Microsoft.Office.Word.Server.Conversions
namespace however I am getting the following build error:
The type or namespace name 'Word' does not exist in the namespace 'Microsoft.Office' (are you missing an assembly reference?)
These are the assembly references that I have in my project:
I am sure I am missing something fairly basic but I am not sure what. Any suggestions?
Solution
You need to reference Microsoft.Office.Word.Server
which is located in the GAC (C:\Windows\Microsoft.NET\assembly\GAC_MSIL
). It is not safe to reference Microsoft.Office.Interop.*
assemblies in a server application.