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
'Usage
Dim instance As IVsFileUpgrade
Dim bstrProjectName As String
Dim bstrFileName As String
Dim bNoBackup As Integer
Dim pLogger As IVsUpgradeLogger
Dim pUpgradeRequired As Integer
Dim returnValue As Integer
returnValue = instance.UpgradeFile(bstrProjectName, _
bstrFileName, bNoBackup, pLogger, _
pUpgradeRequired)
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
)
function UpgradeFile(
bstrProjectName : String,
bstrFileName : String,
bNoBackup : int,
pLogger : IVsUpgradeLogger,
pUpgradeRequired : int
) : int
Parameters
bstrProjectName
Type: System.String[in] String containing the name of the project the file belongs to.
bstrFileName
Type: System.String[in] String containing the full path and name of the file to upgrade.
bNoBackup
Type: System.Int32[in] Boolean. If true, no backup file is created.
pLogger
Type: Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger[in] Pointer to a IVsUpgradeLogger interface to use for logging upgrade actions.
pUpgradeRequired
Type: System.Int32%[out] Boolean. Set to true if the upgrade succeeded.
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:
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.