anchor.diff:  open Microsoft.VisualStudio.Shell
   open EnvDTE
   
  +type IMenuCommand =
  +    inherit IOleCommandTarget
  +    abstract IsAdded: bool with get, set
  +    abstract NextTarget: IOleCommandTarget with get, set
  +
   type NoPeekDefinitionFilter() =
  -    member val IsAdded = false with get, set
  -    member val NextTarget: IOleCommandTarget = null with get, set
  +    interface IMenuCommand with
  +        member val IsAdded = false with get, set
  +        member val NextTarget = null with get, set
   
  -    interface IOleCommandTarget with
           member x.Exec (pguidCmdGroup, nCmdId, nCmdexecopt, pvaIn, pvaOut) =
               if pguidCmdGroup = VSConstants.VsStd12 && 
                   (nCmdId = uint32 VSConstants.VSStd12CmdID.PeekDefinition
  
positive.code:                    | VisualStudioVersion.VS2013 -> 
                          // Make sure that Peek Definition menu items are disabled on VS2013
                          addCommandFilter textViewAdapter (new NoPeekDefinitionFilter())
                     | _ -> ()
          
negative.code:                 prgCmds.[0].cmdf <- uint32 (OLECMDF.OLECMDF_SUPPORTED ||| OLECMDF.OLECMDF_INVISIBLE)
                  VSConstants.S_OK
              else
                  let x = x :> IMenuCommand
                  x.NextTarget.QueryStatus(&pguidCmdGroup, cCmds, prgCmds, pCmdText)
  
  type AlwaysPeekDefinitionFilter() =
      interface IMenuCommand with
          member val IsAdded = false with get, set
          member val NextTarget = null with get, set
  
          member x.Exec (pguidCmdGroup, nCmdId, nCmdexecopt, pvaIn, pvaOut) =
              let x = x :> IMenuCommand
              x.NextTarget.Exec(&pguidCmdGroup, nCmdId, nCmdexecopt, pvaIn, pvaOut)
  
          member x.QueryStatus (pguidCmdGroup, cCmds, prgCmds, pCmdText) =
              if pguidCmdGroup = VSConstants.VsStd12 && 
                  prgCmds |> Seq.exists (fun x -> 
                                 x.cmdID = uint32 VSConstants.VSStd12CmdID.PeekDefinition
                              || x.cmdID = uint32 VSConstants.VSStd12CmdID.PeekNavigateBackward
                              || x.cmdID = uint32 VSConstants.VSStd12CmdID.PeekNavigateForward) then
                  prgCmds.[0].cmdf <- uint32 (OLECMDF.OLECMDF_SUPPORTED ||| OLECMDF.OLECMDF_ENABLED)
                  VSConstants.S_OK
              else
                  let x = x :> IMenuCommand
                  x.NextTarget.QueryStatus(&pguidCmdGroup, cCmds, prgCmds, pCmdText)
  
  [<Export(typeof<IVsTextViewCreationListener>)>]
  