您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

Azure Functions 中支持的语言Supported languages in Azure Functions

本文介绍为可用于 Azure Functions 的语言提供的支持级别。This article explains the levels of support offered for languages that you can use with Azure Functions.

支持级别Levels of support

有三个支持级别:There are three levels of support:

  • 正式发布 (GA) - 完全支持并获得批准在生产中使用。Generally available (GA) - Fully supported and approved for production use.
  • 预览 - 尚不支持,但将来应达到 GA 状态。Preview - Not yet supported but is expected to reach GA status in the future.
  • 实验性 - 不支持,将来可能会弃用;不保证最终达到预览或 GA 状态。Experimental - Not supported and might be abandoned in the future; no guarantee of eventual preview or GA status.

运行时 1.x 和 2.x 中的语言Languages in runtime 1.x and 2.x

这两个版本的 Azure Functions 运行时都可用。Two versions of the Azure Functions runtime are available. 下表显示每个运行时版本支持的语言。The following table shows which languages are supported in each runtime version.

语言Language 1.x1.x 2.x2.x
C#C# GA (.NET Framework 4.7)GA (.NET Framework 4.7) GA (.NET Core 2.2)GA (.NET Core 2.2)
JavaScriptJavaScript GA (Node 6)GA (Node 6) GA(Node 8 和 10)GA (Node 8 & 10)
F#F# GA (.NET Framework 4.7)GA (.NET Framework 4.7) GA (.NET Core 2.2)GA (.NET Core 2.2)
JavaJava 不可用N/A GA (Java 8)GA (Java 8)
PowerShellPowerShell 试验Experimental 预览版 (PowerShell Core 6)Preview (PowerShell Core 6)
PythonPython 试验Experimental 预览版 (Python 3.6)Preview (Python 3.6)
TypeScriptTypeScript 试验Experimental 正式版(通过转换为 JavaScript 进行支持)GA (supported through transpiling to JavaScript)
BashBash 试验Experimental 不可用N/A
批处理(.cmd、.bat)Batch (.cmd, .bat) 试验Experimental 不可用N/A
PHPPHP 试验Experimental 不可用N/A

有关语言支持计划更改的信息,请参阅 Azure 路线图For information about planned changes to language support, see Azure roadmap.

实验性语言Experimental languages

1.x 版中的实验性语言扩展性不好,并且不支持所有绑定。The experimental languages in version 1.x don't scale well and don't support all bindings.

不要对所依赖的任何内容使用实验性功能,因为对其没有官方支持。Don't use experimental features for anything that you rely on, as there is no official support for them. 不应针对实验性语言的问题开启支持案例。Support cases should not be opened for problems with experimental languages.

2.x 版运行时不支持实验性语言。The version 2.x runtime doesn't support experimental languages. 只有在生产环境中支持该语言时,才会添加对新语言的支持。Support for new languages is added only when the language can be supported in production.

语言扩展性Language extensibility

2.x 运行时旨在提供语言扩展性The 2.x runtime is designed to offer language extensibility. 2.x 运行时中的 JavaScript 和 Java 语言是使用此扩展性生成的。The JavaScript and Java languages in the 2.x runtime are built with this extensibility.

后续步骤Next steps

若要了解如何在 Azure Functions 中使用 GA 或预览版语言之一的详细信息,请参阅以下资源:To learn more about how to use one of the GA or preview languages in Azure Functions, see the following resources: