在 Visual Studio 中使用 VSCode 扩展 [英] Using VSCode Extensions in Visual Studio

查看:29
本文介绍了在 Visual Studio 中使用 VSCode 扩展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我发现了一个 VSCode 扩展,我非常喜欢喜欢在 Visual Studio 2017(专业版或企业版)中使用.我对 VSCode 一点都不熟悉.平台是否完全不同,或者是否有希望我可以以某种方式修改扩展并移植它"?

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"?

推荐答案

平台是否完全不同[...]

Are the platforms entirely different [...]

是的,它们是 - VSCode 扩展在 JavaScript 引擎中运行(通常用 TypeScript 编写),而 Visual Studio 扩展似乎在 .NET(通常是 C#)上运行.它们还有不同的扩展 API:

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 具有所有必需 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.

现在,语言服务器有一个例外,使用微软的语言服务器协议.它被设计为独立于 IDE,并且服务器基本上可以用您喜欢的任何语言编写.VSCode(内置)和 Visual Studio 都有 LSP 客户端实现.不过,您链接的扩展程序不属于此范围.

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.

这篇关于在 Visual Studio 中使用 VSCode 扩展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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