Testing Outlook VSTO Addins

I am trying to write a really simple Outlook VSTO, adding that it checks email that is sent for a few simple properties. My problem is that I cannot install / test the add using Outlook. I added unit tests that ensure that the code I wrote is likely to do what it should, but the final level of integration eludes me. Any suggestions on testing my code in Outlook? Thanks in advance.

If you want, I can post the code too and better explain what it does.

+4
source share
2 answers

If you code in Visual Studio, debugging automatically puts it in Outlook and opens Outlook. Just make sure that Outlook is closed before starting, as this seems to be causing problems. Otherwise, in your bin folder where your dll was created, there is a vsto file, click on it and it will install it.

+3
source

We also had a lot of problems related to the fact that you could not remove the bad add-ons after installing them. Usually we take the following steps:

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

If all this still does not work, one workaround if you installed the vsto add-in outside of Visual Studio (if you want to do this) is to temporarily change the assembly name in the properties of the main assembly to something else. He then tricks the Outlook / installer into thinking that this is a completely new add-in that has not been seen before.

Hope this helps.

0
source

All Articles