Find Install directory and working directory of VSTO Outlook Addin; or any Office Addin

前端 未结 5 1265
攒了一身酷
攒了一身酷 2020-12-06 02:40

I created a VSTO Outlook Addin that uses a library Html2Xhtml.dll (.NET) which calls another Html2xhtml.exe by executing System.Diagnostic.Process.Start().

However,

5条回答
  •  误落风尘
    2020-12-06 02:57

    Had the same issue for ClickOnce applications. Here is what you need to do to get the deployment path of the addin:

    Add System.Deployment.Application reference in your application

    next is to use this property to retrieve the deployment path:

    ApplicationDeployment.CurrentDeployment.UpdateLocation.ToString()
    

    and there you go!

提交回复
热议问题