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"); " 나는 "중단 점을 현재 히트되지 않음 기호는이 문서에 대해로드되지 않았습니다."가지고
읽은덕분에 모두가 여기까지 :)