Visual Studio 2019 - Use PowerShell to open files instead of Solution Explorer

Viewed 1457

I'm looking to use PowerShell as an alternative to Solution Explorer.

For example, you can open a file in VS Code by running this command (assuming the .exe is in the $PATH variable):

ps>code C:\repo\path\to\file.cs

It would be nice if could do the same with Visual Studio:

ps>vs C:\repo\path\to\file.cs

And for those of you asking why, I truly believe this is a faster way. Especially since Ctrl + , doesn't do well with something like index.cshtml

1 Answers

Do you mean you want to open C:\repo\path\to\file.cs in Visual Studio using Powershell?

devenv.exe C:\repo\path\to\file.cs

Related