If you have been using Visual Studio 2017 to create an Outlook Web Add-in and are trying to use the new ItemSend event, you will note per the documentation the you need to add the MailAppVersionOverrides 1.1 to your manifest:
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
The problem is that when you try to build and run the project, you get this exception:
|Warning||This is an invalid xsi:type ‘http://schemas.microsoft.com/office/mailappversionoverrides/1.1:Events’.|
Specifically, Visual Studio 2017 does not like this line:
If you are like me you have been hoping for an update to Visual Studio 2017 to fix this, but I just got word today that it did not get into the last update to Visual Studio 2017, but will make it into Visual Studio 2019. However, you do not need to run off and install Visual Studio 2019 once it is available. There is a workaround, and here are the steps to follow:
- If you have an updated Exchange 2016 Server CU9 or later, you can browse to this folder:
C:\Program Files\Microsoft\Exchange Server\V15\Bin
- Locate and copy the file MailAppVersionOverridesV1_1.xsd and copy it to a removable drive or a network share.
- On your development machine, locate the existing MailAppVersionOverridesV1_1.xsd. It should be located here:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Xml\Schemas\1033
- Rename the existing file to MailAppVersionOverridesV1_1.old.
- Copy the version of the MailAppVersionOverridesV1_1.xsd you got from your Exchange Server here.
At this point you should be good to go.
But wait!?!?! You say you don’t have an Exchange Server? You use Office 365 and your instance of Exchange is up in the cloud? OK… Now this is not the “preferred” method, but it will get the job done. I created a GIST, and you can download it from here. Simply view RAW, copy, open Notepad, paste, Save As: MailAppVersionOverridesV1_1.xsd, and then you have your file.