Chirag
Chirag

Reputation: 1851

Command Line to open ReadMe file when opening project in Visual Studio

I want to open a ReadMe.html file located in my project/solution as soon as Visual Studio is opened. Is there any command line switch to open ReadMe.html file of my project?

For Example, Devenv myproj.csproj /F:ReadMe.html

Note: I want to automate this through a program, so not looking for manual solution to open Visual Studio and click on ReadMe file :)

Please help!

Upvotes: 1

Views: 889

Answers (1)

Chirag
Chirag

Reputation: 1851

Found it!!!

I was able to open ReadMe html file in browser window inside VS as soon as the solution/project is opened. Below is the command:

devenv.exe WebApplication1.sln /Command "Navigate [FilePath]\Project_Readme.html"

FYI, Visual Studio has number of command line switches, the one useful here was "/Command" switch. It Starts the VS IDE and executes the command specified after the /Command switch.

The commands in question are not DOS commands, they are visual studio commands you can execute inside VS. Here is the reference for Visual Studio Commands with Arguments.

Hope that helps someone else too!

Upvotes: 2

Related Questions