VSTO 3.0 and .NET 3.5

From time to time I will come across (via various channels) a question of why VSTO 3.0 requires the 3.5 framework.  Usually these questions are prefaced or suffixed with a “in VSTO 2005 SE I was able to use 2.0, why are you making me use 3.5 now?”

Just to clarify, when I talk about VSTO 3.0 I mean only the addins that are build in VS 2008 and are labelled "Office 2007".   Office 2003 addins in VS 2008 are essentially the same as addins build in VSTO 2005 SE (which can be loaded in both 2003 and 2007).

The answer is both short and long and simple and complicated.  The short and simple answer is that VSTO 3.0 requires .Net 3.5.  If I left it at that I imagine I would get a lot more questions so I’ll go into the long answer:

In the VS 2008 timeframe we rebuilt the loading model for VSTO.  This new loading model consists of 2 major parts, the first being that the VSTO runtime now uses the System.Addin Framework.  You can read about the System.Addin framework here: https://msdn2.microsoft.com/en-us/library/bb384200.aspx.  I don’t know as much about this, but I’m told that it is a good thing all around. 

The second major part, the one that I do know about is around “deployment” (ClickOnce).  In VS 2008 we integrated the ClickOnce model of trust, installation and loading into the Runtime.  The benefits have been that the model is much easier to use for the end user.   The associated cost has been that in order to integrate this functionality properly, additional changes to the ClickOnce framework had to be made (some of which is only a part of the 3.5 framework).  These changes not only include publishing and installation but it includes the basic security model that the VSTO runtime uses.

So even if you don’t use ClickOnce with VSTO 3.0 solutions, the runtime itself relies on functionality that exists only within the 3.5 framework.   Hopefully that clarifies the reasoning behind why we require the 3.5 framework.  

Until next time, thank you for reading.