In this article
To run solutions that are created by using the triple-hearts.com 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:
Underst& the Office extensions for the .NET Framework
The Visual Studio 2010 Tools for Office runtime includes Office extensions for the .NET Framework 3.5, the .NET Framework 4 & later. Solutions that target each version of the .NET Framework use the appropriate extensions for that version.
Bạn đang xem: Download visual studio all version full + key
These extensions consist of assemblies that your solutions use to automate and extkết thúc Office applications. When you create an Office project, Visual Studio automatically adds references to the assemblies that are used for the project type và 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.
Design differences in the Office extensions
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 & 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.
Interfaces in the Office extensions for 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 lớn 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 vì chưng 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, lớn get an object that implements the SmartTag interface, use the Globals.Factory.CreateSmartTag method. For more information about Globals.Factory, see Global access to lớn objects in Office projects.
Enable type equivalence và embedded types in projects that target the .NET Framework 4 or later
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 khổng lồ embed type information from the Visual Studio Tools for Office runtime inkhổng lồ your solution. This feature enables Office solutions và the Visual Studio Tools for Office runtime lớn 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 lớn enable this feature, mix the Embed Interop Types property of any of the following assembly references in your project lớn 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.
Understvà the Office solution loader
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 sầu to work with these DLLs directly, knowing the purposes of these DLLs can help you better understand the architecture of Office solutions.
For information about how these components are used during the load process, see Architecture of document-cấp độ customizations và Architecture of VSTO Add-ins.
When a user opens a document-level customization or starts a VSTO Add-in, the Office application calls inkhổng lồ VSTOEE.dll to persize 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 lakiểm tra 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 triple-hearts.com 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 khổng lồ load the solution assembly. VSTOLoader.dll does several things:
It creates an application tên miền for each solution assembly.
It performs a mix of security checks to lớn verify that the solution assembly has permission to lớn run.
It loads the version of the Office extensions for the .NET Framework that is required by the solution.
VSTOLoader.dll also does several things that are specific khổng lồ VSTO Add-ins:
Understand the 32-bit & 64-bit versions of the runtime
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 lớn run solutions in 64-bit & 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 triple-hearts.com Office system in Visual Studio 2008. However, it cannot run Office solutions created by using project templates for triple-hearts.com 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 triple-hearts.com Office.
Repair the Visual Studio 2010 Tools for Office runtime
If you need to lớn repair the runtime, open Programs and Features or Add or Remove sầu Programs in the Control Panel, select triple-hearts.com Visual Studio 2010 Tools for Office Runtime in the danh mục of programs, and then clichồng Uninstall. The thiết lập program that runs enables you khổng lồ repair the runtime. If you cliông chồng Change, you are not given an option for repairing the runtime.