Azure.Compute.Batch vs Microsoft.Azure.Batch

yuriy@mquark.com 20 Reputation points
2025-02-28T04:16:43.19+00:00

What's the difference between Microsoft.Azure.Batch and Azure.Compute.Batch packages and which one should be preferred for the new development?

Both are included in https://github.com/Azure/azure-sdk-for-net and Microsoft has samples for both, but surprisingly not a word about which one is up to date:

I also noticed that unlike Microsoft.Azure.Batch, the Azure.Compute.Batch includes dependency injection capabilities like other Azure clients do:

services.AddAzureClients(clients =>
{
    clients.AddBatchClient(new Uri("<batch-endpoint-url>"));
});

Which makes me thinks that it's more modern, but on the other hand its NuGet version is 1.0.0-beta.1 - is it not ready to be used at the moment?

Azure Batch
Azure Batch
An Azure service that provides cloud-scale job scheduling and compute management.
355 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vinodh247 28,386 Reputation points MVP
    2025-02-28T06:00:18.1333333+00:00

    Hi ,

    Thanks for reaching out to Microsoft Q&A.

    In the Azure .NET SDK ecosystem, Microsoft.Azure.Batch is the older, stable library for Azure Batch, while Azure.Compute.Batch is the newer, more modern library that’s still in preview (1.0.0-beta.1). The newer library aligns with updated Azure SDK conventions such as the built in dependency injection pattern you noticed but it has not yet reached GA. If you want a stable, fully supported library right now, Microsoft.Azure.Batch is the safer choice. If you want modern features, future-proof design, and can accommodate potential changes before GA, Azure.Compute.Batch is the logical pick for new development.

    In general, Microsoft’s long-term plan is to move services toward the updated client libraries following the official Azure SDK guidelines. These guidelines focus on improved discoverability, consistent methods, and better integration with common frameworks and dependency injection. So if you’re starting a new project and can handle a preview dependency, or plan to migrate once the library goes GA, adopting Azure.Compute.Batch may save you from a future refactor. However, if you need a production-ready library right now without any beta disclaimers, Microsoft.Azure.Batch remains the stable solution.

    Please feel free to click the 'Upvote' (Thumbs-up) button and 'Accept as Answer'. This helps the community by allowing others with similar queries to easily find the solution.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.