To run 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.
Descargar archivo https://lpoms.com/2yOUWU
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.
Visual Studio Tools for Office (VSTO) is a set of development tools available in the form of a Visual Studio add-in (project templates) and a runtime that allows Microsoft Office 2003 and later versions of Office applications to host the .NET Framework Common Language Runtime (CLR) to expose their functionality via .NET.
This allows extensions to the Office applications to be written in CLI compliant languages as well as to use functionality and user interface constructs from Office applications in .NET applications.[1] Extensions to Office prior to Office 2003 only allowed the creation of COM add-ins using Visual Basic or Visual C++ and a "Developer" edition was also offered that enabled VBA developers to create COM Add-ins.
VSTO supersedes developer editions of Office 2000 and Office XP for Office development. The developer editions of Office have been discontinued after Office XP and VSTO is available for Office 2003 and later versions only. The VSTO runtime, although part of VSTO development tools, is also downloadable separately if required. COM addin development is still possible for Office 2000 and all later versions using the Shared Add-in template in any version of Microsoft Visual Studio.
The VSTO add-ins (project types and controls) are also developed using Visual Studio. For Visual Studio .NET 2003 and Visual Studio 2005, it was available only as a standalone edition with support for .NET languages limited to Visual Basic.NET and C#. It was also included as a part of the Visual Studio Team System 2005.
Later on, the Visual Studio Tools for Office 2005 Second Edition (VSTO 2005 SE) was released as a free add-in to Visual Studio Professional and above that includes Office 2007 and 2003 support. However, for Visual Studio Professional Edition, it installs only the application-level add-ins; it does not add the document-level customizations or other functionality (actions pane, host controls, visual document designer, etc.) available in the full version of VSTO or Team System editions.[2][3]
d3342ee215