Share via


IVsTrackProjectRetargetingEvents.OnRetargetingBeforeChange Method

Fired before a retargeting change occurs. This is the first event sent to subscribers. The subscriber can choose to cancel retargeting on receiving this event.

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

Syntax

'Declaration
Function OnRetargetingBeforeChange ( _
    projRef As String, _
    pBeforeChangeHier As IVsHierarchy, _
    currentTargetFramework As String, _
    newTargetFramework As String, _
    <OutAttribute> ByRef pCanceled As Boolean, _
    <OutAttribute> ByRef ppReasonMsg As String _
) As Integer
int OnRetargetingBeforeChange(
    string projRef,
    IVsHierarchy pBeforeChangeHier,
    string currentTargetFramework,
    string newTargetFramework,
    out bool pCanceled,
    out string ppReasonMsg
)
int OnRetargetingBeforeChange(
    [InAttribute] String^ projRef, 
    [InAttribute] IVsHierarchy^ pBeforeChangeHier, 
    [InAttribute] String^ currentTargetFramework, 
    [InAttribute] String^ newTargetFramework, 
    [OutAttribute] bool% pCanceled, 
    [OutAttribute] String^% ppReasonMsg
)
abstract OnRetargetingBeforeChange : 
        projRef:string * 
        pBeforeChangeHier:IVsHierarchy * 
        currentTargetFramework:string * 
        newTargetFramework:string * 
        pCanceled:bool byref * 
        ppReasonMsg:string byref -> int
function OnRetargetingBeforeChange(
    projRef : String, 
    pBeforeChangeHier : IVsHierarchy, 
    currentTargetFramework : String, 
    newTargetFramework : String, 
    pCanceled : boolean, 
    ppReasonMsg : String
) : int

Parameters

  • projRef
    Type: System.String

    [in] The unique project reference name.

  • currentTargetFramework
    Type: System.String

    [in] The current target framework of the project.

  • newTargetFramework
    Type: System.String

    [in] The new target framework of the project.

  • pCanceled
    Type: System.Boolean%

    [out] If true, retargeting was canceled by one of the subscribers.

  • ppReasonMsg
    Type: System.String%

    [out] A message string containing the reason why the cancelation occurred.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

.NET Framework Security

See Also

Reference

IVsTrackProjectRetargetingEvents Interface

Microsoft.VisualStudio.Shell.Interop Namespace