在 Visual Studio 2017 的现有实例中打开文件 [英] Open file in existing instance of Visual Studio 2017

查看:47
本文介绍了在 Visual Studio 2017 的现有实例中打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经能够在 VS 的现有实例中打开文件 - devenv.exe 有一个 /dde 开关.

I used to be able to open a file in an existing instance of VS - devenv.exe had a /dde switch for that.

但在 VS2017 中,它会在新实例中打开文件,而不是已经在运行的实例.

But with VS2017 it opens the file in a new instance, not the one already running.

以json文件为例:

  • 我的注册表有一个键 HKEY_CLASSES_ROOT\.json\OpenWithProgids,其中包含一个值 VisualStudio.json.
  • 还有一个键 HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\Command 包含默认值 "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe"/dde.
  • My registry has a key HKEY_CLASSES_ROOT\.json\OpenWithProgids which contains a value VisualStudio.json.
  • And there is a key HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\Command which contains the default value "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe" /dde.

但是那个 /dde 被忽略了.

But that /dde is ignored.

也许所有的测试版和 RC 都损坏了某些东西.我的VS2017是最新更新的版本.

Maybe all the betas and RCs corrupted something. My VS2017 is the latest updated version.

/dde 开关还能用吗?

推荐答案

好吧,缺少的是这些:

  • HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\,默认值为 Open("%1").

HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\Application\,默认值为 VisualStudio.15.0

HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\Topic\,默认值为 system

所有与 VS 相关的文件都遵循此模式.

All VS related files follow this pattern.

这篇关于在 Visual Studio 2017 的现有实例中打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆