Dec 11

I found that when I created a custom outlook add-in to run on the Send event, that it doesn't run when I deploy it on another machine (works fine on my own). After much research, I found that a requirement on the other machine is not included in the deployment files. We needed Extensibility.dll to be installed on the target machine. For some reason, this is not included in VS 2008, despite there being a KB article for this file for VS2005. Research shows that the majority of people had to downgrade back to VS2005 to get Extensibility.dll installed on target machines, but that is not necessary.

First you need to have Visual Studio 2005 installed somewhere so you can download the kb article from here and install it: http://support.microsoft.com/kb/908002. Without VS 2005, you won't be able to install this kb (which I find silly because you need it for VS2008).

After installing, you can then do one of the following 2 ways.

The hard way...

1.    Navigate to C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages, locate KB908002 folder.
2.    Log on to the machine which has Visual Studio 2008 installed and copy KB908002 folder to C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

Now if you go to the pre-requisites list on VS 2008 (right click on the Setup and view properties, then click prerequisites), you'll see a new prerequisite, Shared Add-in Support Update for Microsoft .NET Framework 2.0. Check that and select "Download prerequisites from the same location as my application. This way, when you build it, a new folder is created with the required MSI in your deployment folder.

Or the easier way...

Navigate to C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages on the PC with VS2005 on it, locate KB908002 folder. Copy the extensibilityMSM.msi file to the target machine and install it there.

Which method you choose will depend on your own personal requirements.

Note that depending on what you need, you may need to right click on "Office.dll" in the Detected Dependencies folder and include it. I had to include Office.dll in my project too for the add-in to function.

Dec 11

In Visual Studio, create a new Project > Other Project Types > Extensibility > Shared Add-in and select the application or applications you are writing the add-in for. In my case, the add in is written for Outlook, so I unchecked everything and selected Outlook only. Hit next, give it a name and description. Then next again and check both boxes. Then Finish.

Since I'm writing code for the Send event, I need to have a new method:

    void OutlookApplication_ItemSend(object Item, ref bool Cancel)
    {
        MessageBox.Show("Item sent");
    }

That's it, now you need to package it into an MSI to install it on another machine. If all goes well, it will work on the new machine and you will have no problems, however that is not the case on most machines as I will be discussing in my next article.

Off topic

When you see the properties of the Setup file, set the Manufacturer to the name of the folder where you want this installed by default and also set the InstallAllUsers to True. On installation, the user has the option of changing it anyway, but it's good to have these set as default.

Dec 2

stsadm -o setproperty -propertyname max-template-document-size -propertyvalue 500000000
(hard limit of 500Mb)
 
Then to export the site and import it, run the following commands on your intranet
 
Note: you will need to give full control permissions to whoever is logged in on the intranet server for the site being imported to. What I did was to give full control to that account, then remove the user once the import is completed.
 
stsadm -o export -url http://intranet/path/to/website -includeusersecurity -nofilecompression -filename C:\somebackupfolder

Create the new site on your intranet.

stsadm -o import -url http://intranet/new/site -includeusersecurity -nofilecompression -filename C:\somebackupfolder