In this article I’m going to sharing my experience while troubleshooting an assembly related issue in Windows. My client came with an issue where he was not able to get an Outlook add-in to work on his Windows computer. He was getting an Exception Error:
Could not load file or assembly ‘Microsoft.Office.Interop.Outlook’ or one of its dependencies. The system cannot find the file specified
while opening Outlook.
So I went to Start | Run |and typed in Assembly.
In the list I found the specific dll which I was looking. When I checked up the version, I found the version seems to be different. That is, the version which the Outlook add-in was looking for was v14.0, but in assembly I found v10.0 and v14.0 to be present. So I tried to uninstall v10 assembly by right-clicking on the dll and selecting Uninstall.
On doing it, I received the following error message:
So I felt that the only way now, it seemed, was to uninstall Office and reinstall it – because it’s an entry from a pervious version of Office. So I went to Programs and Features and removed Microsoft Office completely and rebooted the system. I then went back to Assembly and checked. But the file was still there, and I was just unable to remove it. I kept getting the same error message as above.
Then I remembered a method I used a long time back where I had switched the Assembly view to Folder view.
To do so, open Windows Registry and navigate to the following key:
Here, create a new DWORD “DisableCacheViewer” and give it value “1”.
I now went back to Assembly and it changed the view to Folders:
I searched the specific dll file and removed all its entries and rebooted the system.
Finally, I went and deleted “DisableCacheViewer” from registry and reverted back to Assembly view.
The file no longer exists. I installed Office back and installed the add-ins again, and it works just fine now.
Using the same method you could easily remove Assemblies by switching to the Folder view.
Hope this tip helps you.