Vsto Redist

0 views
Skip to first unread message

Sabel Kantah

unread,
Aug 4, 2024, 11:45:40 PM8/4/24
to izintaswobb
Torun solutions that are created by using the Microsoft Office developer tools in Visual Studio, the Visual Studio 2010 Tools for Office runtime must be installed on end-user computers. For more information, see How to: Install the Visual Studio Tools for Office runtime redistributable. The Visual Studio 2010 Tools for Office runtime consists of two main components:

The Office extensions for the .NET Framework. These components are managed assemblies that provide the communication layer between your solution and the Microsoft Office application. For more information, see Understand the Office extensions for the .NET Framework.


The Office solution loader. This component is a set of unmanaged DLLs that Office applications use to load the runtime and your solutions. For more information, see Understand the Office solution loader.


The runtime can be installed in several different ways. Depending on the configuration of the computer, different runtime components are installed when you install the runtime. For more information, see Visual Studio Tools for Office runtime installation scenarios.


The Visual Studio 2010 Tools for Office runtime includes Office extensions for the .NET Framework 3.5, the .NET Framework 4 and later. Solutions that target each version of the .NET Framework use the appropriate extensions for that version.


These extensions consist of assemblies that your solutions use to automate and extend Office applications. When you create an Office project, Visual Studio automatically adds references to the assemblies that are used for the project type and the target .NET Framework of the project. For more information about the assemblies in the Office extensions, see Assemblies in the Visual Studio Tools for Office runtime.


Most of the types that you use in the Office extensions for the .NET Framework 3.5 are classes. These are the same classes that were included in previous versions of the Visual Studio Tools for Office runtime . In contrast, most of the types that you use in the Office extensions for the .NET Framework 4 or later are interfaces. For example, when you target the .NET Framework 4 or later, the Worksheet and Document types are interfaces instead of classes.


In most cases, the code you write in Office solutions is the same whether your solution targets the .NET Framework 3.5 or the .NET Framework 4. However, certain features require different code when you target different versions of the .NET Framework. For more information, see Migrate Office solutions to the .NET Framework 4 or later.


Most of the interfaces in the Office extensions for the .NET Framework 4 or later are not intended to be implemented by user code. The only interfaces you can implement directly have names that begin with the letter I, such as ISmartTagExtension.


All interfaces that do not begin with the letter I are implemented internally by the Visual Studio 2010 Tools for Office runtime, and these interfaces might change in future releases. To create objects that implement these interfaces, use methods provided by the Globals.Factory object in your project. For example, to get an object that implements the SmartTag interface, use the Globals.Factory.CreateSmartTag method. For more information about Globals.Factory, see Global access to objects in Office projects.


Because the object model of the Office extensions for the .NET Framework 4 or later are based on interfaces, you can use the type equivalence feature in both Visual C# and Visual Basic in Visual Studio to embed type information from the Visual Studio Tools for Office runtime into your solution. This feature enables Office solutions and the Visual Studio Tools for Office runtime to version independently of each other. For example, if your solution uses the Document interface as an embedded type and the next version of the runtime adds members to the Document interface, your solution will still work with the next version of the runtime. If your solution does not use the Document interface as an embedded type, then your solution will no longer work with the next version of the runtime.


By default, the type equivalence feature is not enabled when you create an Office project that targets the .NET Framework 4 or later. If you want to enable this feature, set the Embed Interop Types property of any of the following assembly references in your project to True:


After you make this change, type information for all of the runtime types used by the project is embedded into the solution assembly when you build the project. This embedded type information, rather than the type information in the referenced assemblies, are used by the solution at run time.


The Visual Studio Tools for Office runtime includes several unmanaged DLLs that Office applications use to load the runtime and Office solutions. Although you should never have to work with these DLLs directly, knowing the purposes of these DLLs can help you better understand the architecture of Office solutions.


When a user opens a document-level customization or starts a VSTO Add-in, the Office application calls into VSTOEE.dll to perform the tasks required to load the Visual Studio Tools for Office runtime .


VSTOEE.dll makes sure that the correct version of the Visual Studio Tools for Office runtime is loaded for the solution and the installed version of Office. Although multiple versions of the Visual Studio Tools for Office runtime can be installed on the same computer, only one instance of VSTOEE.dll is installed at a time. This is the VSTOEE.dll that was included with the latest version of the runtime installed on the computer. For more information about the different versions of the Visual Studio Tools for Office runtime that can be used for other solutions, see Run solutions in different versions of Microsoft Office.


After VSTOEE.dll loads the appropriate version of the Visual Studio Tools for Office runtime , VSTOLoader.dll performs most of the work that is required to load the solution assembly. VSTOLoader.dll does several things:


It implements the IDTExtensibility2 interface. IDTExtensibility2 is a COM interface that all VSTO Add-ins for Microsoft Office applications must implement. This interface defines methods that the application calls to communicate with the VSTO Add-in.


There are separate 64-bit and 32-bit versions of the Visual Studio 2010 Tools for Office runtime. These versions of the runtime are used to run solutions in 64-bit and 32-bit editions Office. The following table shows which version of the runtime is required for each combination of Windows and Office.


When you install Office, the required version of the Visual Studio Tools for Office runtime is installed along with Office. For example, when you install the 64-bit edition of Office on a 64-bit version of Windows, the 64-bit version of the Visual Studio Tools for Office runtime is also installed. For more information about installing the Visual Studio Tools for Office runtime with Office, see Visual Studio Tools for Office runtime installation scenarios.


The 64-bit version of Office can also run Office solutions that were created by using project templates for the 2007 Microsoft Office system in Visual Studio 2008. However, it cannot run Office solutions created by using project templates for Microsoft Office 2003 in Visual Studio 2008, or Office solutions created by using Visual Studio 2005. For more information, see Run solutions in different versions of Microsoft Office.


If you need to repair the runtime, open Programs and Features or Add or Remove Programs in the Control Panel, select Microsoft Visual Studio 2010 Tools for Office Runtime in the list of programs, and then click Uninstall. The setup program that runs enables you to repair the runtime. If you click Change, you are not given an option for repairing the runtime.


I found that we needed both the x86 and x64 C++ redistributables as prerequisites. Also the checksum's in the .prq files are wrong, so the xml needed updating with the MD5 hash of the downloaded files:


If you are an organization using Chocolatey, we want your experience to be fully reliable. Due to the nature of this publicly offered repository, reliability cannot be guaranteed. Packages offered here are subject to distribution rights, which means they may need to reach out further to the internet to the official locations to download files at runtime.


Fortunately, distribution rights do not apply for internal use. With any edition of Chocolatey (including the free open source edition), you can host your own packages and cache or internalize existing community packages.


Running Office customizations built for this version of Visual Studio Tools for Office requires Microsoft Office 2007 or later. However, this package does not have an Office install as a pre-requisite. It will attempt to discover an Office install before it proceeds, but it will only provide a warning if one is not found.


In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

3a8082e126
Reply all
Reply to author
Forward
0 new messages