Hello,
I have an application which uses the Microsoft.Office.Interop assemblies. On a couple of machines, for some reason when my application is running and PowerPoint is started, on the users end, they can't click on any dropdowns. My applications throws this exception:
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
I am using the Microsoft.Office.Interop assemblies from NuGet.
Looking at the Fusion logs I found that PowerPoint is searching for Microsoft.Office.Interop.Excel not in their usual path (like on my machine): C:\WINDOWS\assembly\GAC_MSIL\Policy.14.0.Microsoft.Office.Interop.Excel\15.0.0.0__71e9bce111e9429c\Policy.14.0.Microsoft.Office.Interop.Excel.config, but inside C:\Program Files\WindowsApps\Microsoft.Office.Desktop_16040.11001.20108.0_x86__8wekyb3d8bbwe\VFS\Windows\assembly\GAC_MSIL\Policy.14.0.Microsoft.Offic.
*** Assembly Binder Log Entry (3/13/2021 @ 11:32:55 AM) ***
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\MyApp\app.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: DisplayName = Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/MyApp/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = app.exe
Calling assembly : app, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files\MyApp\file.config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Publisher policy file is found at **C:\Program Files\WindowsApps\Microsoft.Office.Desktop_16040.11001.20108.0_x86__8wekyb3d8bbwe\VFS\Windows\assembly\GAC_MSIL\Policy.14.0.Microsoft.Offic.**
WRN: Error parsing XML file **C:\Program Files\WindowsApps\Microsoft.Office.Desktop_16040.11001.20108.0_x86__8wekyb3d8bbwe\VFS\Windows\assembly\GAC_MSIL\Policy.14.0.Microsoft.Offic.** Ignoring.
LOG: Post-policy reference: Microsoft.Office.Interop.Excel, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
LOG: GAC Lookup was unsuccessful.
LOG: Attempting download of new URL file:///C:/Program Files/MyApp/Microsoft.Office.Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/MyApp/Microsoft.Office.Interop.Excel/Microsoft.Office.Interop.Excel.DLL.
LOG: Attempting download of new URL file:///C:/Program Files/MyApp/Microsoft.Office.Interop.Excel.EXE.
LOG: Attempting download of new URL file:///C:/Program Files/MyApp/Microsoft.Office.Interop.Excel/Microsoft.Office.Interop.Excel.EXE.
LOG: All probing URLs attempted and failed.
The issue is happening on Microsoft PowerPoint 2016 MSO 32-bit. I guess this is the Office 365 click-to-run version of PowerPoint.
The users have Microsoft.Office.Interop.Excel.dll in there GAC.
Starting PowerPoint as Admin, resolves the issue.
My question is if this PowerPoint version is not supporting the usage of PIA or this PowerPoint version maybe corrupting the permissions on the Interop assemblies in the GAC?