Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

IVsTextViewCreationListener don't work after VSIX project update from 2012 to 2013

$
0
0

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


Viewing all articles
Browse latest Browse all 4410

Trending Articles