Using VSCode Extensions in Visual Studio

时光怂恿深爱的人放手 提交于 2019-12-08 01:01:50

问题


Today I found a VSCode extension that I would very much love to use in Visual Studio 2017 (Pro or Enterprise). I'm not at all familiar with VSCode. Are the platforms entirely different, or is there some hope that I could somehow modify the extension and "port it over"?


回答1:


Are the platforms entirely different [...]

Yes, they are - VSCode extensions run in a JavaScript engine (and are usually written with TypeScript), while Visual Studio extensions seem to run on .NET (usually C#). They also have different extension APIs:

  • Visual Studio 2017 SDK
  • Visual Studio Code Extension API

That doesn't mean that extension couldn't be ported over of course, provided Visual Studio has equivalents for all the required APIs, but it would essentially be a rewrite.

Now, there's an exception to this with language servers, using Microsoft's Language Server Protocol. It is designed to be IDE-independent and servers can be written in basically whatever language you prefer. There's LSP clients implementations for both VSCode (built-in) and Visual Studio. The extension you linked doesn't fall under that though.



来源:https://stackoverflow.com/questions/50263441/using-vscode-extensions-in-visual-studio

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