RetargetVstaProject Method

 

Changes an existing Visual Studio Tools for Applications project to target a different version of Visual Studio or the .NET Framework.

Syntax

HRESULT RetargetVstaProject(IProjectStorage* pSourceProjectStorage, int vsVersion, int targetFramework, SAFEARRAY* psaReferencesToRemove, SAFEARRAY* psaReferencesToAdd, IProjectStorage** ppProjectStorage);

Parameters

IProjectStorage

[in] An IProjectStorage containing the project to retarget.

vsVersion

[in] The version of Visual Studio to target.

targetFramework

[in] The specific .NET Framework to target.

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.

ppProjectStorage

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

Return Value

One of the standard HRESULT values.

Remarks

This method is defined in the file vsta.h.

Requirements

DLL

VstaCore.dll

Library

VstaCore.lib

Header

Vsta.h

See Also

VSVersion Constants
TargetFramework Constants
Functions (VSTA)