共用方式為


IVsFileUpgrade2.UpgradeFile_CheckOnly Method

Definition

Check if a specified tool can be upgraded.

public:
 int UpgradeFile_CheckOnly(System::String ^ bstrProjectName, System::String ^ bstrFileName, int bNoBackup, Microsoft::VisualStudio::Shell::Interop::IVsUpgradeLogger ^ pLogger, System::UInt16 oldToolsVersionMajor, System::UInt16 oldToolsVersionMinor, System::UInt16 newToolsVersionMajor, System::UInt16 newToolsVersionMinor, [Runtime::InteropServices::Out] int % pUpgradeRequired);
int UpgradeFile_CheckOnly(std::wstring const & bstrProjectName, std::wstring const & bstrFileName, int bNoBackup, Microsoft::VisualStudio::Shell::Interop::IVsUpgradeLogger const & pLogger, unsigned short oldToolsVersionMajor, unsigned short oldToolsVersionMinor, unsigned short newToolsVersionMajor, unsigned short newToolsVersionMinor, [Runtime::InteropServices::Out] int & pUpgradeRequired);
public int UpgradeFile_CheckOnly (string bstrProjectName, string bstrFileName, int bNoBackup, Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger pLogger, ushort oldToolsVersionMajor, ushort oldToolsVersionMinor, ushort newToolsVersionMajor, ushort newToolsVersionMinor, out int pUpgradeRequired);
abstract member UpgradeFile_CheckOnly : string * string * int * Microsoft.VisualStudio.Shell.Interop.IVsUpgradeLogger * uint16 * uint16 * uint16 * uint16 * int -> int
Public 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, 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.

oldToolsVersionMajor
UInt16

[in] Major version of old tool.

oldToolsVersionMinor
UInt16

[in] Minor version of old tool.

newToolsVersionMajor
UInt16

[in] Major version of new tool.

newToolsVersionMinor
UInt16

[in] Minor version of new tool.

pUpgradeRequired
Int32

[out] Boolean. Set to true if the upgrade is possible.

Returns

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

Applies to