내 Visual Studio Extension은 IVsSolutionEvents.OnAfterOpenSolution()
을 통해 솔루션을 여는 것에 응답합니다.Visual Studio Extension에서 "Open Folder"및 "Open Solution"에 응답하는 방법은 무엇입니까?
Visual Studio 2017은 "솔루션 열기"대신 "Open Folder"을 도입했지만 폴더를 열면 IVsSolutionEvents.OnAfterOpenSolution()
이 실행되지 않습니다. (IVsSolutionEvents
에있는 다른 이벤트도없고 IVsSolutionLoadEvents
에있는 이벤트도 포함되지 않습니다.
해결책과 달리 폴더를 열 때 내 내선 번호를 어떻게 알 수 있습니까?
IVsSolutionEvents7 :: OnAfterOpenFolder를 찾으십니까? https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualstudio.shell.interop.ivssolutionevents7?view=visualstudiosdk-2017 –
@SimonMourier : 완벽 해 보이지만 구현하고 구현할 때 IVsSolution.AdviseSolutionEvents()에 객체를 보내면,'IVsSolutionEvents7' 이벤트가 발생하지 않습니다. 객체는 또한'IVsSolutionEvents'를 구현하고, 그 이벤트는 발생합니다. 어떤 아이디어가 ...? – RichieHindle
아니,이게 실제로 유일한 방법이라고 생각해. 일부 VS DLL은 그 인터페이스를 구현합니다 (예 : Microsoft.VisualStudio.Shell.UI.Internal, class Microsoft.VisualStudio.PlatformUI.StartPageToolWindowPane). ICustomQueryInterface를 일시적으로 구현하여 해당 인터페이스를 요청하는지 여부를 확인할 수도 있습니다. –