如何将Jenkinsfile支持添加到Visual Studio 2017 [英] How can i add Jenkinsfile support to visual studio 2017

查看:362
本文介绍了如何将Jenkinsfile支持添加到Visual Studio 2017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 2017 Pro,但由于我的项目中Jenkinsfile的语法突出显示不足,我感到非常疯狂.我正在使用声明性语法,但是我似乎无法找到任何使它起作用的方法.我的研究表明,它是基于常规的,但是我也没有找到将其映射到该语言的方法.任何帮助表示赞赏.

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.

推荐答案

这可能不是每个人的解决方案,但对我来说,它可行: Jenkinsfiles是我正在使用的唯一不带扩展名的文件,因此我打开了 工具->选项->文本编辑器->文件扩展名 然后,我选中了将无扩展名的文件映射到:",然后选择了"Javascript编辑器"

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

这篇关于如何将Jenkinsfile支持添加到Visual Studio 2017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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