This project has moved. For the latest updates, please go here.

The type or namespace name 'NetOffice' could not be found (are you missing a using directive or an assembly reference?)

Dec 4, 2014 at 4:42 AM
Hi,

I am referring the required NetOffice dlls in a Windows service application
to convert docs to pdf.

'Embed Interop Types' property is missing on NetOffice and all other referred NetOffice dll's properties window.

When I try to build the project, I am getting this error.
"The type or namespace name 'NetOffice' could not be found (are you missing a using directive or an assembly reference?)"

Could you please help me with this.

Thank you
Coordinator
Dec 4, 2014 at 7:40 AM
"'Embed Interop Types' property is missing on NetOffice and all other referred NetOffice dll's properties window. "

not sure this is a compiler error?

please check the assembly reference settings for each NetOffice assembly and make sure the option "Embed Interop Types" is set to 'false'.

*Sebastian
Dec 4, 2014 at 8:32 AM
Hi,

".Net Framework" was set to 3.5

After changing Target framework to ".NET Framework 4" (Project Properties --> Application tab) and setting "Embed Interop Types" to "false" for each dll referred it started working like a charm.

Thank you