IVsProjectUpgradeViaFactory.UpgradeProject Method

Upgrades a project.

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

Syntax

'Declaration
Function UpgradeProject ( _
    bstrFileName As String, _
    fUpgradeFlag As UInteger, _
    bstrCopyLocation As String, _
    <OutAttribute> ByRef pbstrUpgradedFullyQualifiedFileName As String, _
    pLogger As IVsUpgradeLogger, _
    <OutAttribute> ByRef pUpgradeRequired As Integer, _
    <OutAttribute> ByRef pguidNewProjectFactory As Guid _
) As Integer
'Usage
Dim instance As IVsProjectUpgradeViaFactory 
Dim bstrFileName As String 
Dim fUpgradeFlag As UInteger 
Dim bstrCopyLocation As String 
Dim pbstrUpgradedFullyQualifiedFileName As String 
Dim pLogger As IVsUpgradeLogger 
Dim pUpgradeRequired As Integer 
Dim pguidNewProjectFactory As Guid 
Dim returnValue As Integer 

returnValue = instance.UpgradeProject(bstrFileName, _
    fUpgradeFlag, bstrCopyLocation, _
    pbstrUpgradedFullyQualifiedFileName, _
    pLogger, pUpgradeRequired, pguidNewProjectFactory)
int UpgradeProject(
    string bstrFileName,
    uint fUpgradeFlag,
    string bstrCopyLocation,
    out string pbstrUpgradedFullyQualifiedFileName,
    IVsUpgradeLogger pLogger,
    out int pUpgradeRequired,
    out Guid pguidNewProjectFactory
)
int UpgradeProject(
    [InAttribute] String^ bstrFileName, 
    [InAttribute] unsigned int fUpgradeFlag, 
    [InAttribute] String^ bstrCopyLocation, 
    [OutAttribute] String^% pbstrUpgradedFullyQualifiedFileName, 
    [InAttribute] IVsUpgradeLogger^ pLogger, 
    [OutAttribute] int% pUpgradeRequired, 
    [OutAttribute] Guid% pguidNewProjectFactory
)
function UpgradeProject(
    bstrFileName : String, 
    fUpgradeFlag : uint, 
    bstrCopyLocation : String, 
    pbstrUpgradedFullyQualifiedFileName : String, 
    pLogger : IVsUpgradeLogger, 
    pUpgradeRequired : int, 
    pguidNewProjectFactory : Guid
) : int

Parameters

  • bstrFileName
    Type: System.String

    [in] Project file of project to update.

  • bstrCopyLocation
    Type: System.String

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

  • pbstrUpgradedFullyQualifiedFileName
    Type: System.String%

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

  • pUpgradeRequired
    Type: System.Int32%

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

  • pguidNewProjectFactory
    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.

Remarks

COM Signature

From vsshell80.idl:

[C++]

HRESULT UpgradeProject(
    [in]  BSTR               bstrFileName,
    [in]  VSPUVF_FLAGS     * fUpgradeFlags,
    [in]  BSTR               bstrCopyLocation,
    [out] BSTR *             pbstrUpgradedFullyQualifiedFileName,
    [in]  IVsUpgradeLogger * pLogger,
    [out] BOOL             * pUpgradeRequired,
    [out] GUID             * pguidNewProjectFactory,
);

.NET Framework Security

See Also

Reference

IVsProjectUpgradeViaFactory Interface

IVsProjectUpgradeViaFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace