Visual Studio 2015 does not see Microsoft. Office. Interop

Visual Studio 2015 does not see Microsoft.Office.Interop when working with Microsoft Office 2016. Assembly Microsoft Office 16.0 Object Library is connected. The Microsoft.Office.Core namespace is fine, but Microsoft.Office.Interop doesn't see it at all.

What could be the reason?

Author: andreycha, 2016-01-07

1 answers

Partial solution to the problem

So far, the problem has been resolved, but, unfortunately, so far partially.

Due to unknown reasons, the necessary assemblies were not included in the global cache (GAC) during the installation process. Therefore, for Excel, I found the necessary assembly in the package folder and connected it from there. Folder location:

C:\Program Files\Microsoft Office\root\VFS\ProgramFilesX86\Microsoft Office\Office16\DCF

You can also find the build for Access.

I found the build for Outlook here:

C:\Program Files\Microsoft Office\root\Office16\ADDINS\Microsoft Power Query for Excel Integrated\bin

How to distinguish the necessary assemblies from all the others?

(The information is rather for those who may read this answer in the future)

Assemblies designed to work with Office from .NET have a distinctive name:

Microsoft.Office.Interop.{Имя_приложения}.dll

That is, for Excel the assembly will be called:

Microsoft.Office.Interop.Excel.dll

UPDATE 08.01.2016 Final solution to the problem

In the end, the problem was completely resolved by itself. install "clean" Microsoft Office 2016 "from scratch". Previously, it was just an update from the version 2010 (apparently it went wrong).

 1
Author: Streletz, 2016-01-08 15:01:35