Question

I am trying to write a really simple Outlook VSTO add in that checks email that is being sent for a few simple properties. My problem is that I cannot seem to install/test the add in using Outlook. I have added unit tests that ensure the code I have written likely does what it should but that final level of integration eludes me. Any suggestions for how to test my code within Outlook? Thanks in advance.

If you want I can post the code as well and better explain what it does.

Was it helpful?

Solution

If you are coding in Visual Studio debugging automatically places it in Outlook and Opens Outlook. Just make sure Outlook is closed before starting as this seems to cause issues. Otherwise in your bin folder where your dll was created there is a vsto file, Click on that and it will install it.

OTHER TIPS

We've also had many issues also around not being able to remove bad add-ins once installed. The usual steps we take are to:

  • Uninstall the VSTO add-in (using the vstoinstaller /u command)
  • Delete directories within the %userprofile%\AppData\Local\Apps\2.0 directory
  • Delete directories within the %userprofile%\AppData\Local\assembly\dl3 directory
  • Clear the ClickOnce app cache (rundll32 dfshim,CleanOnlineAppCache)

If these all still do not work, one workaround if you would install the vsto add-in outside of Visual Studio (if you would like to do this) is to temporarily change the assembly name in the properties of the main assembly to something else. This then fools Outlook/installer into thinking this is a brand new add-in that has not been seen before.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top