简体   繁体   English

从 windows 上的 ubuntu bash 终端打开 Visual Studio(不是 Visual Studio 代码)

[英]Open Visual Studio (Not Visual Studio Code) from the ubuntu bash terminal on windows

I was wondering if it is possible to open Visual Studio (Not Visual Studio Code) from the ubuntu bash terminal on windows .我想知道是否可以从 windows 上的ubuntu bash 终端打开 Visual Studio (不是 Visual Studio Code)。

Opening Visual Studio Code just works fine but I couldn't find a way on how I could actually open Visual Studio from the command line.打开 Visual Studio Code 工作正常,但我找不到如何从命令行实际打开 Visual Studio 的方法。

Thank you in advance!先感谢您!

It is possible to refer to anything in the Windows file system from inside WSL.可以从 WSL 内部引用 Windows 文件系统中的任何内容。 However, understand that, since Visual Studio is a Windows exclusive application, it will run in the context of your host Windows OS, not the Ubuntu guest OS.但是,请理解,由于 Visual Studio 是 Windows 专有应用程序,它将在您的主机 Windows 操作系统的上下文中运行,而不是 Ubuntu 来宾操作系统的上下文中。 By contrast, Visual Studio Code is a Linux-native application;相比之下,Visual Studio Code 是 Linux 原生应用程序; so it can run in either context.因此它可以在任一上下文中运行。

Try this:尝试这个:

’/mnt/c/Windows/System32/cmd.exe /c “/mnt/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/devenv.exe”'

If this works, you can save the command as an alias in your .bashrc如果可行,您可以将命令另存为.bashrc中的别名

References:参考:

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM