Compartir a través de


IVsFileUpgrade.UpgradeFile Method

Definition

Upgrades a single file.

public:
 int UpgradeFile(System::String ^ bstrProjectName, System::String ^ bstrFileName, int bNoBackup, Microsoft::VisualStudio::Shell::Interop::IVsUpgradeLogger ^ pLogger, [Runtime::InteropServices::Out] int % pUpgradeRequired);
int UpgradeFile(std::wstring const & bstrProjectName, std::wstring const & bstrFileName, int bNoBackup, Microsoft::VisualStudio::Shell::Interop::IVsUpgradeLogger const & pLogger, [Runtime::InteropServices::Out] int & pUpgradeRequired);
public int UpgradeFile (string bstrProjectName, string bstrFileName, int bNoBackup, Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger pLogger, out int pUpgradeRequired);
abstract member UpgradeFile : string * string * int * Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger * int -> int
Public Function UpgradeFile (bstrProjectName As String, bstrFileName As String, bNoBackup As Integer, pLogger As IVsUpgradeLogger, ByRef pUpgradeRequired As Integer) As Integer

Parameters

bstrProjectName
String

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

bstrFileName
String

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

bNoBackup
Int32

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

pLogger
IVsUpgradeLogger

[in] Pointer to a IVsUpgradeLogger interface to use for logging upgrade actions.

pUpgradeRequired
Int32

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

Returns

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).

Applies to