问题描述
我想开发一个DevOps中心插件,该插件可获取工作项详细信息并生成PDF.
I want to develop a DevOps hub plugin that gets work item details and generates a PDF.
我查看了所有似乎都使用打字稿的示例: https://docs.microsoft.com/zh-CN/azure/devops/extend/develop/samples-overview?view=azure-devops .
I have viewed the samples that all seem to use typescript: https://docs.microsoft.com/en-us/azure/devops/extend/develop/samples-overview?view=azure-devops.
我无法理解代码在其中运行的上下文,它是在服务器上还是在浏览器中运行?我知道我需要使用Web服务器,因为我已经插入了测试集线器,并且正在从本地Web服务器运行.
I'm having trouble understanding the context that the code runs in, does it run on the server or in the browser? I know I need to use a web server as I have made a test hub plug in and is running from my local web server.
我希望能够使用服务器端C#ASP.NET,这是否可行,还是我们必须使用客户端语言?
I would prefer to be able to use server side C# ASP.NET, is this possible or do we have to use a client side language?
推荐答案
这取决于您要执行的操作.
It depends on how you want to do it.
DevOps扩展本身仅在客户端,并且是Javascript/Typescript.因此,如果您要开发,说一个用于工作项表单的自定义控件,那么您就可以使用它.但是它托管在Azure DevOps本身中.
The DevOps extension itself is only on client side and is Javascript/Typescript. So, if you are developing say a custom control for the work item form, that's all you can use. But it is hosted within Azure DevOps itself.
如果中心显示外部页面,则您可以执行任何操作.但是您必须自己托管所有内容.
If your hub shows an external page, you can do whatever you want. But you have to host all that content yourself.
在您的示例中,我不会使用外部网站.所有这些都可以在浏览器中完成.实际上,我做了一个(私有)扩展,其功能非常相似.
For your example I would not use an external site. It can all be done in the browser. In fact I made a (private) extension that does something very similar.
这篇关于Azure DevOps扩展-我可以使用哪种语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!