RetargetVstaProject Method

 

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

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.

One of the standard HRESULT values.

This method is defined in the file vsta.h.

Requirements

DLL

VstaCore.dll

Library

VstaCore.lib

Header

Vsta.h

Show: