I can create COM add-ins based on the Shared Add-in template in VS 2008 and they all work well on my developing computer. However, I got an issue when I tried to deploy them on configurations where only .NET Framework 2.0 is installed.
In the New Project dialog we can select the targeting .NET Framework version, 2.0 or 3.0 or 3.5. Since I needed to get the COM add-ins to work with version 2.0 I selected that version and then continued to work with the add-ins.
To test that they work with the targeting .NET Framework version I deployed them on configurations with Windows XP SP-3 where only version 2.0 of .NET Framework was installed. I also tried to deploy them on a Windows Vista SP-1 configuration with .NET Framework 3.0 but I got the same outcome as with Windows XP.
The outcome was the following:
I was rather surprised by this message so I started to try to locate the source but first I couldn’t find any errors at all. Finally I took a closer look on the setup packages. There I found out that it exist a launch condition for every setup. It’s not possible to remove it so what we can do is to change its condition.
The following screen shot shows the default setting (despite the fact that .NET Framework 2.0 was explicit selected in the first place). In the left window we can see the launch condition and in the right window its present setting of the property Version:
This was easily to change as the following screen shot shows:
I then compiled the setup packages again and deployed them. This time everything worked as expected on all platforms.
Hopefully this can be useful for other developers. I hope that the upcoming SP-1 for VS 2008 will include a fix for it.
Kind regards,
Dennis