Develop Office Client Applications using Visual Studio
During development of the VSTO 2010 Runtime we added a feature, dubbed Install on Demand, to support VSTO customizations that target both .NET Framework 3.5 and .NET Framework 4 without enforcing installation of both frameworks prior to installation of VSTO 2010. To facilitate this we needed to break the runtime into 3 components as shown in this diagram.
VSTO Loader can be viewed as the native component of the VSTO 2010 Runtime that communicates with Office. It has no managed dependency and is the only component of the VSTO 2010 Runtime that is guaranteed to be “turned on” no matter how the runtime is installed (the different installation scenarios are discussed below). The extensions (Office 3.5 Runtime Extensions and Office 4.0 Runtime Extensions), shown above VSTO Loader, are the components necessary to execute customizations that target the corresponding version of the .Net Framework. The red arrows indicate which .Net Framework version the extensions depend on.
To better understand how the new Install on Demand functionality will affect you and your end users I will explain the impact from the 3 distinct scenarios with which the VSTO 2010 Runtime can be installed.
Because of these different scenarios we could not assume (or enforce a prerequisite) that any particular version of the .NET Framework was installed on an end users machine at the time they install the VSTO 2010 Runtime. To make this clear, imagine you are deploying a customization that targets .Net Framework 3.5 to a customer who has not yet moved to .Net Framework 4. If we were to unconditionally install all 3 components in the diagram above we would be forced to prereq the .Net Framework 4 which would mean your customer would have to install .Net Framework 4 even though your customization would not require it. Similarly, if you were deploying a customization that targets .Net Framework 4 to a customer that has .Net Framework 4 and no .Net Framework 3.5 we would have to prereq .Net Framework 3.5. What we did was to allow the extensions to only be “turned on” once the version of the .NET Framework that they depend on was present. As a result of the Install on Demand design we have made it more flexible for developers and end users to install the VSTO 2010 Runtime "once" and forget about it. No manual configuration of VSTO is required after installing a version of the .Net Framework that “lights up” either of the extensions.
VSTO 2010 Runtime, as it has been in past Visual Studio releases, is chained in with the Visual Studio 2010 installation. Developers who install Visual Studio 2010 on a machine without .NET Framework 3.5 will have the Office 4.0 Runtime Extensions “turned on” and the Office 3.5 Runtime Extensions “turned off” (but ready to be “turned on” when applicable) as is shown here.
If the developer decides to start creating .Net Framework 3.5 customizations they are going to need to install the .NET Framework 3.5. After the .Net Framework 3.5 installation when the developer launches Visual Studio 2010 they will be able to target .NET Framework 3.5. However, the VSTO 2010 Runtime still does not have the Office 3.5 Runtime Extensions “turned on”. No worries, this will be taken care of for the developer the first time they create a VSTO project that targets .Net Framework 3.5. During this initial project creation you will notice an MSI configuration dialog appear.
When the project is successfully created the VSTO 2010 Runtime will have installed the Office 3.5 Runtime Extensions which will transition the runtime into the following state allowing the project to be F5’d.
If .NET Framework 3.5 was on the box prior to the Visual Studio 2010 installation then the runtime will be installed in its entirety (both Office 3.5 and Office 4.0 Runtime Extensions “turned on”) and no Install on Demand will take place from that point on.
If you weren’t already aware, VSTO 2010 will be included in the Office 2010 installation. This is great news for end users who will not have to install the VSTO 2010 Runtime redistributable to execute customizations that target .Net Framework 3.5. Note that in the Beta and RTM releases of Office 2010 you will NOT get Office 4.0 Runtime Extensions (or the capability for them to be “turned on”). If you are deploying customizations that target .Net Framework 4 and they will run on Office 2010 you will need your users to install the VSTO 2010 Runtime redistributable (and of course before their customization will run they will have to install .Net Framework 4).
End users who install Office 2010 will receive the VSTO runtime and the Office 3.5 Runtime Extensions “turn on” capability. That is, if .NET Framework 3.5 is on the machine then these extensions will be installed and “turned on” otherwise they will be ready to "turn on”.
End users who install the redistributable, either through the bootstrapper (setup.exe) or the download center, will receive both extensions and be able to run customizations that target both .Net Framework 3.5 and 4. No matter how the machine is configured, at the time the redistributable is installed, all deployed solutions will be able to run as long as the appropriate target .Net Framework version is present. Note that this is not limited to ClickOnce deployment, custom MSI deployment will also work this way. For customizations deployed via ClickOnce the “turning on” of extensions will occur during the installation process and for MSI deployment on first load of the customization. In both these cases users will see the MSI configuration dialog (shown in the image above) briefly.
In conclusion, Install on Demand coupled with the VSTO 2010 Runtime shipping with Office 2010 simplifies many deployment scenarios. End users of Office 2010 customizations that target .Net Framework 3.5 will never need to manually install the VSTO 2010 Runtime nor know of its existence. Those still using Office2007 or Office 2010 with .Net Framework 4 will have the flexibility to install the VSTO 2010 Runtime without worrying if they have the correct .Net Framework down before doing so.
Is VS 2010 runtime available in both 32 bit as well as 64 bit? If they are different, will I have separate CLick Once Installers for 32 bit and 64 bit so that the appropriate pre-requistes get installed OR will the 32 bit VS 2010 runtime work fine on a 64 bit box as well.
Yes, the VSTO 2010 runtime is available in 32-bit and 64-bit.
We have implemented a single ClickOnce bootstrapper that will install either 32-bit or 64-bit VSTO 2010 runtime depending on the architecture of the client machine. The logic for 32-bit and 64-bit is taken care of for you by us :D You simply select the VSTO 2010 runtime in the prerequisite dialog from the publish properties tab and you don't have to worry about the target architecture.
Wow... Its really cool.
Installing Runtime along with Office is really a great feature and decreases the burden of checking and installing in the client system before deploying the addins.
And also I love that "turning on" functionality based on the f/w version. :)
How do you "turn on" the Office 4.0 extensions after installing Office 2010? I installed Office 2010, then installed .Net 4.0 and then installed my add-in which targets .NET 4. My add-in failed to load until I installed the VSTO 2010 redistributable. Is there a way to just turn on the 4.0 extensions without having to install the VSTO 2010 redistributable?
I had the same issue as Pachabelle. It seems that if .NET4 is not on the system at the time of Office installation, the VSTO 4.0 extensions are not really installed. I think if you change the registry key that your VSTO prerequisite is looking for to HKLM\Software\Microsoft\vsto runtime setup\v4R\VSTORFeature_CLR40 instead of HKLM\Software\Microsoft\vsto runtime setup\v4\Install then your add-ins installation can better determine if the needed components are really there. Of course, I may be way of on that so it would be nice to hear from someone that knows a real answer.
@Pachabelle & Todd
I covered this above under the title Office 2010. Sorry if it wasn't clear.
Quote: "Note that in the Beta and RTM releases of Office 2010 you will NOT get Office 4.0 Runtime Extensions (or the capability for them to be “turned on”)." ~ accompanied by the diagram showing the cross through the Office 4.0 Runtime Extensions
Because of this you will need to bootstrap (or otherwise require) the VSTO Runtime redistributable in order to obtain .NET 4.0 capability. Note that it has been mentioned on the VSTO forums that we are planning to provide .NET 4.0 support in Office 2010 SP1 which would alleviate the need to install the VSTO Runtime redistributable for any Office 2010 customization.
Sorry, I completely missed the "RTM" in the above and just read "Beta". That clears it up. So am I correct in using the "HKLM\Software\Microsoft\vsto runtime setup\v4R\VSTORFeature_CLR40" registry key as a validation check for my VSTO 2010 prerequisite installation? I don't want our installer to force the issue if the components are already there.
Do you have any suggestions for how to enforce a launch condition to check for .Net Framework 4 first, BEFORE checking for VSTO 4.0? I am trying to create a MSI with Launch Conditions to alert the user to install .Net Framework 4 as well as VSTO 4.0, and the problem is that the VSTO 4.0 condition runs first, but it doesn't actually get installed because the Framework 4.0 is not installed yet:( .
I am trying to avoid asking my clients to install via the Bootstrapper.
is there a reason why you don't want to use the bootstrapper, which is designed to check for and install prerequisites? items selected in the prerequisites dialog box are installed in the order that they appear in that dialog box. this means that .NET Framweork 4 is installed first.
if you add the project output from your Office solution to the setup project, a .NET Framework launch condition is automatically added to the setup project. theoretically, the .NET Framework launch condition should be run before any registry launch conditions, such as the search for the VSTO runtime. if you are not seeing that order, you could amend the message for the launch condition to say "Make sure to install the .NET Framework 4 before installing the Visual Studio 2010 Tools for Office runtime".
I don't have anything against the bootstrapper, but I have been requested to create the install with a single MSI which handles launch conditions.... apparently certain customers do not want to be giving a Setup.exe, a MSI, etc. They want a MSI to take care of everything and they prefer to handle setting up the prerequisites themselves. Thanks.
What will happen if i have VSTO 3.0 SP1 as well on a machine with Office 2010 installed and I repair VSTO 3.0 SP1 ? Will it overwrite the VSTO 2010 Runtime Extensions for 3.5?
Will VSTO 2005 SE Runtime and VSTO 2010 Runtime coexist on the same Windows 7 Desktop?
Will the old office add-ins developed for VSTO2005 SE still works fine without any conflicts after installing both Runtimes??
Thanks & Regards,
Tood, did you have any answer to your question about the correct registry key as a validation check for my VSTO 2010 prerequisite installation?
the correct registry keys for the VSTO 2010 runtime are in the following whitepaper:
add-ins for the VSTO 2005 SE runtime use a different format in the registry key. when Office sees the different registry key, it will load the VSTO 2005 SE runtime.