简体   繁体   English

Visual Studio 2019-使用PowerShell打开文件而不是解决方案资源管理器

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

I'm looking to use PowerShell as an alternative to Solution Explorer. 我正在寻找将PowerShell用作解决方案资源管理器的替代方案。

For example, you can open a file in VS Code by running this command (assuming the .exe is in the $PATH variable): 例如,您可以通过运行以下命令在VS Code中打开文件(假设.exe位于$PATH变量中):

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

It would be nice if could do the same with Visual Studio: 如果可以使用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 特别是由于Ctrl + ,index.cshtml东西效果index.cshtml

Do you mean you want to open C:\\repo\\path\\to\\file.cs in Visual Studio using Powershell? 您是否要使用Powershell在Visual Studio中打开C:\\ repo \\ path \\ to \\ file.cs?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Visual Studio 2019 解决方案资源管理器中筛选以显示被 Git 忽略的文件 - Filter To Show Files Ignored By Git In Visual Studio 2019 Solution Explorer Visual Studio 2012在解决方案资源管理器中突出显示所有打开的文件吗? - Visual Studio 2012 Highlight all open files in solution explorer? 无法在 Visual Studio 2019 中打开 WPF 解决方案 - Unable to open WPF solution in Visual studio 2019 visual studio 2019 打开解决方案文件不兼容 - visual studio 2019 open solution file incompatible Visual Studio Community 2019 中的解决方案资源管理器如何刷新? - How can the Solution Explorer in Visual Studio Community 2019 be refreshed? Visual Studio解决方案资源管理器中的快捷方式(.lnk)文件 - Shortcut (.lnk) files in Visual Studio Solution Explorer Visual Studio SQL文件在解决方案资源管理器中不可见 - Visual Studio SQL files not visible in Solution Explorer Visual Studio 2019 - 在解决方案资源管理器中查找不在源代码管理中的项目 - Visual Studio 2019 - Find items not in source control in Solution Explorer Visual Studio 未在解决方案资源管理器中显示已提交的文件 - Visual Studio not showing committed files in Solution Explorer 在Visual Studio中的解决方案资源管理器中组织项目文件 - Organizing project files in Solution Explorer in Visual Studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM