Why doesn't the office PIA install correctly to the GAC?

微笑、不失礼 提交于 2019-11-29 05:43:16

I hit this a while ago, with a similar project. The PIA redistributable will only install the PIAs if Office is already installed on the machine (which kind of makes sense, but can be annoying when it comes to deployment)

Visual Studio should install the Office PIAs into a folder under it's own install directory - for example, on my machine I have a copy of all the PIAs under:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office14

It's possible that these only get installed if you have Office on your machine at the time VS is installed, or perhaps there is an install option in the VS installer to install VSTO (Visual Studio Tools for Office).

If your problem is just related to getting a build working on the development machine that doesn't have Office, then you could try re-running the VS installer and see if you get an option to install VSTO, or try a google search and see if there is a separate VSTO download

Otherwise, I would just copy the PIAs from this folder to a similar location on the other Dev box.

for the first point, I am 100% sure that GAC has been implemented to support versioning of the same assemblies, you can build an assembly called myCode.dll and register its version 1.0 to the GAC, then you build the version 1.1 and 2.0 and add both to the GAC, even if all of them have the same file name, GAC will keep both and every application will be able to use the proper version depending on the assembly binding information available, basically every application which holds a reference to the version 1.0 still gets it unless specified and is not affected by the presence of newer version.

Eventually when you list the presence of the Outlook PIA in the gac you see only the latest available version and not all of them but surely you should be able, somehow, to push another version in the GAC anyway.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!