Has Microsoft updated Windows and Office software with .NET-type dll assemblies?

George Seese 1 Reputation point
2020-12-04T21:22:40.663+00:00

In Visual Studio, Reference Manager includes COM objects for references. Does Windows and Office still use their original dll files? I've read that .NET .dll assemblies have advantages over older kinds of dll files (COM, Win32?). How are "wrappers" used? Is there an article or book that explains this? The extension "dll" can represent a variety of assemblies. It can be Calculate.dll, a Class Library project I made that has one simple method. Or it can be a collection of Excel stuff in Microsoft.Office.Interop.Excel.dll. Why didn't Microsoft assign a new extension (e.g. .dlla) for the different .NET assembly dll files, in the way Excel released .xlsx and .xlsm?

.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,130 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Cheong00 3,471 Reputation points
    2020-12-08T05:42:06.667+00:00

    I think there is major misunderstanding here.

    The Primary-Interop-Assembly (PIA) is a bunch of .NET libraries for including reference to MS Office 2007+. It's for use of Office Automation as what you use for at the time of VB6. The primary advantage of using it instead of directly "Add reference" to the COM DLL is that, it's registered in the Global Assembly Cache (GAC) and it'll automatically load the correct version of Office for you (Many applications in MS Office allow side-by-side installation with earlier versions).


  2. Cheong00 3,471 Reputation points
    2020-12-09T02:37:07.617+00:00

    PIA for Office 2007 and 2010 are made as downloadable package from Microsoft website, and later versions are installed as ".NET Programmability Support" feature of your office installation. As you can see these are tightly coupled with the corresponding Office version (unless you enabled binding redirection), that's why I said you can load the correct version of Office by using PIA.

    This is the major reason of using PIA over the newer "Embed Interop Types" feature mentioned on the link provided by XingyuZhao. Although it's true that backward compatibility of the Office libraries is good, the applications themselves to some extent does not. Say on a previous company, I can only get the "print cheque" function print correctly on a specific printer from Excel 2007, despite checked the custom paper setting and print boundaries are set exactly the same.