UpgradeProject Method
Collapse the table of content
Expand the table of content

IVsProjectUpgradeViaFactory.UpgradeProject Method (String, UInt32, String, String, IVsUpgradeLogger, Int32, Guid)


Upgrades a project.

Namespace:   Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

int UpgradeProject(
	string bstrFileName,
	uint fUpgradeFlag,
	string bstrCopyLocation,
	out string pbstrUpgradedFullyQualifiedFileName,
	IVsUpgradeLogger pLogger,
	out int pUpgradeRequired,
	out Guid pguidNewProjectFactory


Type: System.String

[in] Project file of project to update.

Type: System.UInt32

[out] Upgrade types specified by the __VSPPROJECTUPGRADEVIAFACTORYFLAGS enumeration. Only one may be specified.

Type: System.String

[in] Location of the copy upgrade, or the backup copy location.

Type: System.String

[out] Copy upgrade will have a different path - others may change the project name.

Type: Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger

[in] A IVsUpgradeLogger interface to the upgrade logger.

Type: System.Int32

[out] true if the project needs upgrading. false if the project is already up-to-date.

Type: System.Guid

[out] If a different project factory is used to create the upgraded project, the GUID should be returned here.

Return Value

Type: System.Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

From vsshell80.idl:


HRESULT UpgradeProject(
    [in]  BSTR               bstrFileName,
    [in]  VSPUVF_FLAGS     * fUpgradeFlags,
    [in]  BSTR               bstrCopyLocation,
    [out] BSTR *             pbstrUpgradedFullyQualifiedFileName,
    [in]  IVsUpgradeLogger * pLogger,
    [out] BOOL             * pUpgradeRequired,
    [out] GUID             * pguidNewProjectFactory,
Return to top
© 2016 Microsoft