Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Unfortunately the answers here so far do not quite cover all the bases.</p> <p><strong>Product Code</strong></p> <p>This does not appear to be reliable - we're looking for a minimum version, not a specific version. Though the product code is in theory only supposed to change for major version increments, the version of VSTO on my machine - 10.0.40303 - has a product code of <strong>{A0FE0292-D3BE-3447-80F2-72E032A54875}</strong>. This suggests that Microsoft isn't necessarily keeping them stable, so I'd suggest this is not a good option.</p> <p><strong>File version</strong></p> <p>Another option may be to check for the presence / version of the VSTO assemblies themselves, which may typically be in %PROGRAM FILES%\Common Files\Microsoft Shared\VSTO\10.0. However I'd say this directory is not guaranteed - the actual directory appears to be specified in the registry, but obviously this solution is now no better than just getting the version from the registry directly...</p> <p><strong>Registry</strong></p> <p>So going by the registry is probably the only option left.</p> <p>Unfortunately, the VSTO runtime version can appear in any one of 4 registry locations:</p> <ul> <li><strong>HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v4</strong> (32-bit, VSTO installed from Office 2010 installation)</li> <li><strong>HKLM\SOFTWARE\Microsoft\VSTO Runtime Setup\v4R</strong> (32-bit, VSTO installed from redistributable)</li> <li><strong>HKLM\SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4</strong> (64-bit, VSTO installed from Office 2010 installation)</li> <li><strong>HKLM\SOFTWARE\Wow6432Node\Microsoft\VSTO Runtime Setup\v4R</strong> (64-bit, VSTO installed from redistributable)</li> </ul> <p>Note: I don't have a definitive source for this - I'm cobbling together bits of information from, for example, <a href="http://msdn.microsoft.com/en-us/library/ff937654.aspx" rel="nofollow noreferrer">this blog post by Wouter van Vugt</a> and <a href="https://stackoverflow.com/a/10734645/78216">this SO answer</a>. There may be even more to it than that.</p> <p>In addition, there may be minimum version requirements, though I suspect that in practice this is only going to affect people running pre-release versions of Office 2010:</p> <blockquote> <p>The Visual Studio 2010 Tools for Office runtime also ships with Microsoft Office 2010. However at the time of Office 2010 RTM, the runtime with Office only supports Office solutions that target the .NET Framework 3.5. If your solution targets the .NET Framework 3.5, it can run either if Office 2010 is installed or if the Visual Studio 2010 Tools for Office Runtime redistributable is installed. If your Office solutions target the .NET Framework 4, you must redistribute the Visual Studio 2010 Tools for Office runtime (<a href="http://msdn.microsoft.com/en-us/library/ff937654.aspx" rel="nofollow noreferrer">citation</a>).</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload