Created
January 17, 2019 20:20
-
-
Save jcansdale/5fcf9a9f5c9fb6487b4c46fe6b0b339d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public string FindOutputFilePath(IVsTextManager2 textManager, IVsEditorAdaptersFactoryService adapters) | |
{ | |
if(textManager.GetActiveView2(1, null, (uint)_VIEWFRAMETYPE.vftCodeWindow, out IVsTextView activeView) == VSConstants.S_OK) | |
{ | |
var textView = adapters.GetWpfTextView(activeView); | |
var doc = textView.TextBuffer.CurrentSnapshot.GetOpenDocumentInCurrentContextWithChanges(); | |
return doc.Project.OutputFilePath; | |
} | |
return null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment