

In most cases, you should add references to the PIAs that are installed by Visual Studio under the %ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\ directory. To use features in multiple Microsoft Office applications, or to use features in an application or component that doesn't have a project in Visual Studio, you must add a reference to the required PIAs. For more information, see Design and create Office solutions.Įvery Office project template in Visual Studio is designed to work with a single Microsoft Office application. The Office PIAs aren't required on end-user computers to run Office solutions. For more information, see Configure a computer to develop Office solutions.
#15 uses of microsoft excel install#
Typically, the PIAs are installed automatically when you install Office on the development computer. To perform certain development tasks, the PIAs must be installed and registered in the global assembly cache on the development computer. (or %ProgramFiles(x86)%\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\ on 64-bit operating systems)įor older versions of Visual Studio, these PIAs will be installed to the Visual Studio Tools for Office\PIA folder under the %ProgramFiles% folder for that version of Visual Studio.įor Example: %ProgramFiles(x86)%\Microsoft Visual Studio 14.0\Visual Studio Tools for Office\PIA\ Primary interop assemblies in the global assembly cache %ProgramFiles%\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA\ The added copies of PIAs will help you to avoid such issues.įor Visual Studio 2017 and later, these copies of the PIAs are installed to following shared locations on the development computer: When different versions of the PIAs are registered in the global assembly cache, you can face several development issues. Visual Studio uses these copies of the PIAs, instead of the assemblies in the global assembly cache, to resolve type references when you develop and build your project. When you create a new project, Visual Studio automatically adds references to these copies of the PIAs to your project. The PIAs are automatically added to a location in the file system, outside of the global assembly cache, while you install Visual Studio. Primary interop assemblies in the program files directory Visual Studio doesn't install and register these assemblies you need to do it yourself. This set of the assemblies is used during some development tasks, such as when you run or debug projects. Visual Studio installs these assemblies automatically.
#15 uses of microsoft excel code#
This set of the assemblies is used when you write code and build projects. These different sets of assemblies are in the following locations:

Visual Studio uses different sets of the PIAs on the development computer. Use features of multiple Microsoft Office applications in a single projectįull list of primary interop assemblies for Microsoft Office applicationsįor more information about primary interop assemblies, see Primary interop assemblies.


Separate primary interop assemblies to build and run projects This article describes the following aspects of using the Microsoft Office PIAs in Office projects: In some scenarios, you might need to add references to other PIAs (for example, you can use a feature of Microsoft Office Word in a project for Microsoft Office Excel). When you create a new Office project, Visual Studio adds references to the PIAs that are required to build the project. Office Add-ins have a small footprint compared to VSTO Add-ins and solutions, and you can build them by using almost any web programming technology, such as HTML5, JavaScript, CSS3, and XML. Interested in developing solutions that extend the Office experience across multiple platforms? Check out the new Office Add-ins model.
