IVsFileUpgrade2.UpgradeFile Method

Upgrade project with a specified file.

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

Syntax

'Declaration
Function UpgradeFile ( _
    bstrProjectName As String, _
    bstrFileName As String, _
    bNoBackup As Integer, _
    pLogger As IVsUpgradeLogger, _
    oldToolsVersionMajor As UShort, _
    oldToolsVersionMinor As UShort, _
    newToolsVersionMajor As UShort, _
    newToolsVersionMinor As UShort, _
    <OutAttribute> ByRef pUpgradeRequired As Integer _
) As Integer
int UpgradeFile(
    string bstrProjectName,
    string bstrFileName,
    int bNoBackup,
    IVsUpgradeLogger pLogger,
    ushort oldToolsVersionMajor,
    ushort oldToolsVersionMinor,
    ushort newToolsVersionMajor,
    ushort newToolsVersionMinor,
    out int pUpgradeRequired
)
int UpgradeFile(
    [InAttribute] String^ bstrProjectName, 
    [InAttribute] String^ bstrFileName, 
    [InAttribute] int bNoBackup, 
    [InAttribute] IVsUpgradeLogger^ pLogger, 
    [InAttribute] unsigned short oldToolsVersionMajor, 
    [InAttribute] unsigned short oldToolsVersionMinor, 
    [InAttribute] unsigned short newToolsVersionMajor, 
    [InAttribute] unsigned short newToolsVersionMinor, 
    [OutAttribute] int% pUpgradeRequired
)
abstract UpgradeFile : 
        bstrProjectName:string * 
        bstrFileName:string * 
        bNoBackup:int * 
        pLogger:IVsUpgradeLogger * 
        oldToolsVersionMajor:uint16 * 
        oldToolsVersionMinor:uint16 * 
        newToolsVersionMajor:uint16 * 
        newToolsVersionMinor:uint16 * 
        pUpgradeRequired:int byref -> int
function UpgradeFile(
    bstrProjectName : String, 
    bstrFileName : String, 
    bNoBackup : int, 
    pLogger : IVsUpgradeLogger, 
    oldToolsVersionMajor : ushort, 
    oldToolsVersionMinor : ushort, 
    newToolsVersionMajor : ushort, 
    newToolsVersionMinor : ushort, 
    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.

  • oldToolsVersionMajor
    Type: UInt16

    [in] Major version of old tool.

  • oldToolsVersionMinor
    Type: UInt16

    [in] Minor version of old tool.

  • newToolsVersionMajor
    Type: UInt16

    [in] Major version of new tool.

  • newToolsVersionMinor
    Type: UInt16

    [in] Minor version of new tool.

  • pUpgradeRequired
    Type: Int32%

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

Return Value

Type: Int32

Remarks

COM Signature

From vsshell90.idl:

HRESULT UpgradeFile(
    [in]  BSTR               bstrProjectName,
    [in]  BSTR               bstrFileName,
    [in]  BOOL               bNoBackup,
    [in]  IVsUpgradeLogger * pLogger,
    [in]  USHORT             oldToolsVersionMajor,
    [in]  USHORT             oldToolsVersionMinor,
    [in]  USHORT             newToolsVersionMajor,
    [in]  USHORT             newToolsVersionMinor,
    [out] BOOL             * pUpgradeRequired
);

.NET Framework Security

See Also

Reference

IVsFileUpgrade2 Interface

Microsoft.VisualStudio.Shell.Interop Namespace