How can i add Jenkinsfile support to visual studio 2017

非 Y 不嫁゛ 提交于 2019-12-21 03:56:11

问题


I am using Visual Studio 2017 Pro, and i am being driven crazy by the lack of syntax highlighting for the Jenkinsfile in my project. I am using the Declarative Syntax, but i just cant seem to find anything on getting this to work. My research says that its based on groovy, but i dont see a way to map it to that language either. Any help is appreciated.


回答1:


This might not be a solution for everyone, but for me, it worked: Jenkinsfiles are the only files without extension I am working with, therefore I opened Tools -> Options -> Text Editor -> File Extensions and then, I checked "Map extensionless files to:" and selected "Javascript Editor"

This does not require to install any extension and the display is great




回答2:


I am in the same boat. Using Visual Studio 2017 Enterprise.

I found this extension recently for Visual Studio Code and this extension for Visual Studio.



来源:https://stackoverflow.com/questions/48101688/how-can-i-add-jenkinsfile-support-to-visual-studio-2017

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