Microsoft.Azure.Functions.Worker 1.0.0
Release notes
The Azure Functions .NET Worker is now GA!
There were many changes between the last preview and this release, and many of the changes were driven by your feedback. Thank you!
Here are some notable changes:
- Public API surface changes
- These are breaking changes, but they provide a more intuitive experience
- New, simplified hosting and registration set of APIs
- New APIs to work against FunctionContext
- Access to function invocation binding data through
FunctionContext
- Enhancements to binding model
- New package layering, offering additional flexibility and enabling future extensibility and testing scenarios
- These are breaking changes, but they provide a more intuitive experience
- Local debugging enhancements
- API to enable simple registration of middleware
- Added support for batched trigger events (#205)
- The following services allow trigger events to be batched:
- Event Hubs (batched by default)
- Service Bus (set
IsBatched = true
in trigger attribute) - Kafka (set
IsBatched = true
in trigger attribute)
- To read batched event data in function code:
- Use array (
[]
),IList
,ICollection
, orIEnumerable
if event data isstring
,byte[]
, orReadOnlyMemory<byte>
(example:string[]
).- Note:
ReadOnlyMemory<byte>
is the more performant option to read binary data, especially for large payloads.
- Note:
- Use a class that implements
IEnumerable
orIEnumerable<T>
for serializable event data (example:List<MyData>
).
- Use array (
- The following services allow trigger events to be batched:
- Several local build and deployment enhancements, including support for self-contained deployments
- Development time enhancements with Analyzers
- Fail function execution if the requested parameter cannot be converted to the specified type (#216)
- Fix issue with referencing extensions that have native dependencies:
- To address this, a default dependency on .NET Core 3.1 SDK was added when targeting Azure Functions 3.0. Note: This dependency can be overridden by setting a build property
<_FunctionsExtensionTargetFramework>netstandard2.0<_FunctionsExtensionTargetFramework/>
but this is only recommended if only using bindings without native dependencies.
- To address this, a default dependency on .NET Core 3.1 SDK was added when targeting Azure Functions 3.0. Note: This dependency can be overridden by setting a build property