IVsFileUpgrade2.UpgradeFile_CheckOnly Method
Check if a specified tool can be upgraded.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.9.0 (in Microsoft.VisualStudio.Shell.Interop.9.0.dll)
Syntax
'Declaration
Function UpgradeFile_CheckOnly ( _
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
'Usage
Dim instance As IVsFileUpgrade2
Dim bstrProjectName As String
Dim bstrFileName As String
Dim bNoBackup As Integer
Dim pLogger As IVsUpgradeLogger
Dim oldToolsVersionMajor As UShort
Dim oldToolsVersionMinor As UShort
Dim newToolsVersionMajor As UShort
Dim newToolsVersionMinor As UShort
Dim pUpgradeRequired As Integer
Dim returnValue As Integer
returnValue = instance.UpgradeFile_CheckOnly(bstrProjectName, _
bstrFileName, bNoBackup, pLogger, _
oldToolsVersionMajor, oldToolsVersionMinor, _
newToolsVersionMajor, newToolsVersionMinor, _
pUpgradeRequired)
int UpgradeFile_CheckOnly(
string bstrProjectName,
string bstrFileName,
int bNoBackup,
IVsUpgradeLogger pLogger,
ushort oldToolsVersionMajor,
ushort oldToolsVersionMinor,
ushort newToolsVersionMajor,
ushort newToolsVersionMinor,
out int pUpgradeRequired
)
int UpgradeFile_CheckOnly(
[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
)
function UpgradeFile_CheckOnly(
bstrProjectName : String,
bstrFileName : String,
bNoBackup : int,
pLogger : IVsUpgradeLogger,
oldToolsVersionMajor : ushort,
oldToolsVersionMinor : ushort,
newToolsVersionMajor : ushort,
newToolsVersionMinor : ushort,
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.
oldToolsVersionMajor
Type: System.UInt16[in] Major version of old tool.
oldToolsVersionMinor
Type: System.UInt16[in] Minor version of old tool.
newToolsVersionMajor
Type: System.UInt16[in] Major version of new tool.
newToolsVersionMinor
Type: System.UInt16[in] Minor version of new tool.
pUpgradeRequired
Type: System.Int32%[out] Boolean. Set to true if the upgrade is possible.
Return Value
Type: System.Int32
Remarks
COM Signature
From vsshell90.idl:
HRESULT UpgradeFile_CheckOnly(
[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
- 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.