Partager via


IVsProjectUpgradeViaFactory.UpgradeProject Method

Definition

Upgrades a project.

public:
 int UpgradeProject(System::String ^ bstrFileName, System::UInt32 fUpgradeFlag, System::String ^ bstrCopyLocation, [Runtime::InteropServices::Out] System::String ^ % pbstrUpgradedFullyQualifiedFileName, Microsoft::VisualStudio::Shell::Interop::IVsUpgradeLogger ^ pLogger, [Runtime::InteropServices::Out] int % pUpgradeRequired, [Runtime::InteropServices::Out] Guid % pguidNewProjectFactory);
public int UpgradeProject (string bstrFileName, uint fUpgradeFlag, string bstrCopyLocation, out string pbstrUpgradedFullyQualifiedFileName, Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger pLogger, out int pUpgradeRequired, out Guid pguidNewProjectFactory);
abstract member UpgradeProject : string * uint32 * string * string * Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger * int * Guid -> int
Public Function UpgradeProject (bstrFileName As String, fUpgradeFlag As UInteger, bstrCopyLocation As String, ByRef pbstrUpgradedFullyQualifiedFileName As String, pLogger As IVsUpgradeLogger, ByRef pUpgradeRequired As Integer, ByRef pguidNewProjectFactory As Guid) As Integer

Parameters

bstrFileName
String

[in] Project file of project to update.

fUpgradeFlag
UInt32

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

bstrCopyLocation
String

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

pbstrUpgradedFullyQualifiedFileName
String

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

pLogger
IVsUpgradeLogger

[in] A IVsUpgradeLogger interface to the upgrade logger.

pUpgradeRequired
Int32

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

pguidNewProjectFactory
Guid

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

Returns

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,  
);  

Applies to