简体   繁体   English

无法识别 VSCode 语言扩展

[英]VSCode language extension not recognized

I have created a new extension (tmlanguage) for VSCode using the Yeoman generator.我使用 Yeoman 生成器为 VSCode 创建了一个新的扩展(tmlanguage)。 The extension where copied to users//.vscode/extensions.复制到 users//.vscode/extensions 的扩展名。 This extenxion is working fine on two of my computers and one collegua's machine.这个扩展在我的两台电脑和一台同事的机器上运行良好。 The extension is implemented, and i can see it in the extensions browser in VSCode.扩展已实现,我可以在 VSCode 的扩展浏览器中看到它。

When I added this for two other colleguas, the same way I did for the 3 first computers, it doesn't work.当我为另外两个同事添加这个时,就像我为第一台 3 台计算机所做的一样,它不起作用。 VSCode acts as if there is noe extensions to read, or does not read them at all. VSCode 的行为就好像没有要读取的扩展,或者根本不读取它们。 As if it does not check the extension folder.好像它不检查扩展文件夹。 I have tried to disable all extension, then enable them again, but still the same.我试图禁用所有扩展,然后再次启用它们,但仍然是一样的。 In the Extension browser there is no mentioning of the new extension.在扩展浏览器中没有提到新的扩展。

Have tried restarting VSCode.已尝试重新启动 VSCode。 One of the machines is Win 11, but the other is Win 10. The machines that work are all Win 10, not that I think this has something to do with it.其中一台机器是Win 11,另一台是Win 10,能用的机器都是Win 10,不是我觉得跟这个有关系。 All running latest version of VSCode.全部运行最新版本的 VSCode。

Is there a way to force VSCode to recognize the extensions?有没有办法强制 VSCode 识别扩展? Have anybody experienced similar things?有没有人经历过类似的事情?

Thanks to Lex Li for pointing me in the correct direction.感谢 Lex Li 为我指明了正确的方向。 I thought I had followed the correct way to do this, to just copy the extension to the.vscode\extensions folder, as specified in several tutorials.我认为我已经按照正确的方法执行此操作,只需将扩展名复制到 .vscode\extensions 文件夹,如几个教程中所述。

But using the vsce to generate a.vsix file did work.但是使用 vsce 生成 a.vsix 文件确实有效。

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

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