Partager via


IVsFileUpgrade.UpgradeFile Method

Upgrades a single file.

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

Syntax

'Declaration
Function UpgradeFile ( _
    bstrProjectName As String, _
    bstrFileName As String, _
    bNoBackup As Integer, _
    pLogger As IVsUpgradeLogger, _
    <OutAttribute> ByRef pUpgradeRequired As Integer _
) As Integer
int UpgradeFile(
    string bstrProjectName,
    string bstrFileName,
    int bNoBackup,
    IVsUpgradeLogger pLogger,
    out int pUpgradeRequired
)
int UpgradeFile(
    [InAttribute] String^ bstrProjectName, 
    [InAttribute] String^ bstrFileName, 
    [InAttribute] int bNoBackup, 
    [InAttribute] IVsUpgradeLogger^ pLogger, 
    [OutAttribute] int% pUpgradeRequired
)
abstract UpgradeFile : 
        bstrProjectName:string * 
        bstrFileName:string * 
        bNoBackup:int * 
        pLogger:IVsUpgradeLogger * 
        pUpgradeRequired:int byref -> int
function UpgradeFile(
    bstrProjectName : String, 
    bstrFileName : String, 
    bNoBackup : int, 
    pLogger : IVsUpgradeLogger, 
    pUpgradeRequired : int
) : int

Parameters

  • bstrProjectName
    Type: String

    [in] String containing the name of the project the file belongs to.

  • bstrFileName
    Type: String

    [in] String containing the full path and name of the file to upgrade.

  • bNoBackup
    Type: Int32

    [in] Boolean. If true, no backup file is created.

  • pUpgradeRequired
    Type: Int32%

    [out] Boolean. Set to true if the upgrade succeeded.

Return Value

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

Remarks

COM Signature

From vsshell80.idl:

HRESULT IVsFileUpgrade::UpgradeFile(
    [in] BSTR bstrProjectName,
    [in] BSTR bstrFileName,
    [in] BOOL bNoBackup,
    [in] IVsUpgradeLogger * pLogger,
    [out] BOOL * pUpgradeRequired
);

Notes to Implementers

Not all implementations will necessarily use all of the method arguments. For example, some implementations will make no use of the project name (bstrProjectName).

.NET Framework Security

See Also

Reference

IVsFileUpgrade Interface

Microsoft.VisualStudio.Shell.Interop Namespace