2013-11-25 2 views
3

Visual Studio 2012를 대상으로하는 VSIX 프로젝트가 있는데 제대로 작동합니다. 하지만 난 추적 기능 "VsTextViewCreated"나는이 라인에서 브레이크 포인트를 설정하려면, 무엇보다2012 년부터 2013 년까지 VSIX 프로젝트 업데이트 후 IVsTextViewCreationListener가 작동하지 않습니다.

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 
{ 
    class CompletionHandler 
    { 
     [Export(typeof(IVsTextViewCreationListener))] 
     [ContentType("CSharp")] 
     [Name("CodeCompletionTypeZero")] 
     [TextViewRole(PredefinedTextViewRoles.Editable)] 
     internal class CompletionHandlerProvider : IVsTextViewCreationListener 
     { 
      [Import] 
      internal IVsEditorAdaptersFactoryService _adapterService = null; 
      [Import] 
      internal ICompletionBroker _completionBroker { get; set; } 
      [Import] 
      internal SVsServiceProvider _serviceProvider { get; set; } 

      public void VsTextViewCreated(IVsTextView textViewAdapter) 
      { 
       Printer.Print("VsTextViewCreated"); 
       ITextView textView = _adapterService.GetWpfTextView(textViewAdapter); 
       if (textView == null) 
       { 
        return; 
       } 
       return; 
      } 
     } 
    } 
} 

호출되지 않은 2013 년 비주얼 스튜디오를 대상으로 프로젝트를 업데이트하면 "Printer.Print을 ("VsTextViewCreated"); " 나는 "중단 점을 현재 히트되지 않음 기호는이 문서에 대해로드되지 않았습니다."가지고

읽은

덕분에 모두가 여기까지 :)

답변

0

"C 삭제 : \ 사용자 \ username이 \의 AppData \ 로컬 \ yourCompanyName " 및 "C : \ 사용자 \ username이 \의 AppData \ 로컬 \ 마이크로 소프트 \으로 VisualStudio \ 12.0Exp "

또한

, 당신의 VSIXxShellExtensions 매니페스트 파일을 수정하고 패키지를 표시"MEFComponent ".

이 또한 좋은 주제입니다. VSIX extension for VS2012 not running when debugging

관련 문제