I have a VSIX project that targets Visual Studio 2012 and it works fine. But when I updated the project to target Visual Studio 2013. The follow function "VsTextViewCreated" wasn't called
using Microsoft.VisualStudio.Editor;
using Microsoft.VisualStudio.Language.Intellisense;
using Microsoft.VisualStudio.Shell;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.TextManager.Interop;
using Microsoft.VisualStudio.Utilities;
using SnippetsUI;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VSIXProject1{classCompletionHandler{[Export(typeof(IVsTextViewCreationListener))][ContentType("CSharp")][Name("CodeCompletionTypeZero")][TextViewRole(PredefinedTextViewRoles.Editable)]internalclassCompletionHandlerProvider:IVsTextViewCreationListener{[Import]internalIVsEditorAdaptersFactoryService _adapterService =null;[Import]internalICompletionBroker _completionBroker { get;set;}[Import]internalSVsServiceProvider _serviceProvider { get;set;}publicvoidVsTextViewCreated(IVsTextView textViewAdapter){Printer.Print("VsTextViewCreated");ITextView textView = _adapterService.GetWpfTextView(textViewAdapter);if(textView==null){return;}return;}}}}What's more, if I want to set a break point at this line: "Printer.Print("VsTextViewCreated");" I got "the breakpoint will not currently be hit. No symbols have been loaded for this document"
Thanks everyone who had read this far :)