UpgradeVstaProject Method

 

Updates a VSTA 2.0 or 1.1 project to a Microsoft Visual Studio Tools for Applications 2012 project and loads the project files into a new instance of IProjectStorage Interface.

Syntax

HRESULT UpgradeVstaProject(BSTR bstrProjectFileName, IProjectStorage* pSourceProjectStorage, SAFEARRAY* psaReferencesToRemove, SAFEARRAY* psaReferencesToAdd, int vsVersion, int targetFramework, IProjectStorage** ppProjectStorage);

Parameters

bstrProjectFileName

[in] Name of the VSTA project file in pSourceProjectStorage.

pSourceProjectStorage

[in] An instance of IProjectStorage containing the project to upgrade.

psaReferencesToRemove

[in] An array of BSTRs containing the names of the references to remove.

psaReferencesToAdd

[in] An array of IReferences containing the names and optional hint paths of the references to add.

vsVersion

[in] The version of Visual Studio to target.

targetFramework

[in] The specific .NET Framework to target.

ppProjectStorage

[out, retval] The IProjectStorage for the upgraded project.

Return Value

One of the standard HRESULT values.

Requirements

DLL

VstaCore.dll

Library

VstaCore.lib

Header

Vsta.h

See Also

Functions (VSTA)