How to open a file programmatically using EnvDTE in C #.
Assuming you have a binding to the correct DTE instance ...
DTE.ExecuteCommand("File.OpenFile", "c:\\derp.txt");
You can try the following snippet directly in the Visual Studio console:
$DTE.ItemOperations.OpenFile("c:\derp.txt",$DTE.Constants.vsViewKindTextView)
It should open the file as long as it exists ...
Source: https://habr.com/ru/post/1792994/More articles:automatic transaction management datacontext - c #Updated static field for members; consultation needed - c #Books for experienced developers - oopC: Any way to convert a text string to float, i.e. 1e100? - cWhat is a good algorithm to protect the kingdom? - c ++how to avoid wrapping in div? - javascriptHow to display strings in WPF ListView in different colors? - listviewWhat is the meaning of this SQL statement? - sqlJavascript Iteration Error - Variable Variable - javascriptfrom new classobj import in Python 3.1 - pythonAll Articles