This concept is new to me, and a colleague suggested it. Sadly, I had no idea what he was talking about. Can someone enlighten me?
Interop assemblies are . NET Framework assemblies that bridge between managed and unmanaged code, mapping COM object members to equivalent . NET Framework managed members. Interop assemblies created by Visual Basic . NET handle many of the details of working with COM objects, such as interoperability marshalling.
Primary interop assemblies in the program files directory The PIAs are automatically added to a location in the file system, outside of the global assembly cache, while you install Visual Studio.
Although it is not necessary to register primary interop assemblies unless you plan to use Visual Studio, registration provides two advantages: A registered primary interop assembly is clearly marked under the registry key of the original type library.
Microsoft Office Interop (Excel Automation) is an option when creating/reading Excel files (XLS, XLSX, CSV) from C# or VB.NET application, but it has many drawbacks.
You can find plenty of information about it here.
In a nutshell, a PIA is a signed interop assembly that provides the "official" definition of types in a COM library from the publisher of the COM library.
As to the benefits, the posted article sums it up pretty good:
PIAs are important because they provide unique type identity. The PIA distinguishes the official type definitions from counterfeit definitions provided by other interop assemblies. Having a single type identity ensures type compatibility between applications that share the types defined in the PIA. Because the PIA is signed by its publisher and labeled with the PrimaryInteropAssembly attribute, it can be differentiated from other interop assemblies that define the same types.
Simply saying through an example,if you want to develop an application resembles like any other office tools(MS word,visio...) with extended functionality, you can use the functionality of office tools in your project using PIA.In my class diagram drawing app,use visio panel for class diagram creation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With