Programmatically open a file in Visual Studio (2010)
I believe you want one of:
- IVsUIShellOpenDocument.OpenStandardEditor
- DTE.OpenFile
- DTE.ItemOperations.OpenFile
In the end, I think they all boil down to the same behavior.
I like to use the DTE method ExecuteCommand("commandName") as you can test the command in the VS Command Window
In this case ExecuteCommand("File.OpenFile")
You can add parameters to the command in a second optional string parameter if you wish.