Reputation: 1459
I want to know the impact of absence of Microsoft.Office.Interop.PowerPoint dll on the PowerPoint add-in performance.
Assume that the launch condition to look for the presence of PIAs on user's machine has been removed during the development of the msi package.
Thanks.
Upvotes: 0
Views: 125
Reputation: 942237
A PIA doesn't have anything to do with performance. It only contains declarations, [ComImport]s for the interfaces and co-classes in the Office object model. The CLR needs them to know how to make a call to them.
A PIA could be necessary in the olden days if one of your public classes exposes Office types. It solves the .NET type identity problem, the CLR insists that types are only identical when they come from the same assembly. The PIA is that one assembly. Note that this is not a common thing to do in an add-in, you typically create only a single assembly.
PIAs are obsolete, thoroughly and elegantly replaced in .NET 4.0 and VS2010. The v4 CLR has a new rule about type identity, a [ComImport] type is considered identical if it has the same [Guid], regardless of what assembly it came from. Which powers the new reference assembly property, you find it back in the Properties window, named "Embed Interop Types". With a default of True.
What that does is tell the compiler to embed the [ComImport] declarations in your assembly. Just as though you had declared them yourself in your source code. With the big, big advantage that you completely lose the runtime dependency on the Microsoft.Office.Interop.PowerPoint interop assembly or the PIA. And you only pay for the interop types that you actually use in your program, Office PIAs are pretty big.
There are just no down-sides to this. So much so that Microsoft does not ship the PIAs for Office 2013 anymore.
So high odds that you are already using the Embed Interop Types feature. Considering that your add-in works, it would crash and burn if you still had a dependency on it. Although technically you could be depending on the kindness of others. Check the Properties window for the Microsoft.Office.Interop.PowerPoint reference to be sure.
Upvotes: 2
Reputation: 55601
I would think it would break the add-in assuming the add-in has a dependency on the interop and in that case the add-in would fail to perform at all when it tries to find types in the interop that it needs and cannot resolve.
Upvotes: 0