How to open file programmatically using EnvDTE in C#

前端 未结 2 1701
一个人的身影
一个人的身影 2021-01-13 10:09

How to open file programmatically using EnvDTE in C#.

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-13 10:28

    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...

提交回复
热议问题