Open file in existing instance of Visual Studio 2017

我只是一个虾纸丫 提交于 2019-12-22 08:37:40

问题


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

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

For example for json files:

  • 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.

But that /dde is ignored.

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

Does the /dde switch still work?


回答1:


Okay what was missing was these:

  • HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\ with a default value of Open("%1").

  • HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\Application\ with a default value of VisualStudio.15.0

  • HKEY_CLASSES_ROOT\VisualStudio.json\shell\Open\ddeexec\Topic\ with a default value of system

All VS related files follow this pattern.



来源:https://stackoverflow.com/questions/44130341/open-file-in-existing-instance-of-visual-studio-2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!