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

前端 未结 2 1719
生来不讨喜
生来不讨喜 2020-12-17 15:04

I am currently working on a c# project, where I need to access Outlook. The development is being done on two different machines, one of which has office installed, and one o

相关标签:
2条回答
  • 2020-12-17 15:23

    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.

    0 讨论(0)
  • 2020-12-17 15:35

    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.

    0 讨论(0)
提交回复
热议问题