Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Juggling AI agent sessions across projects can get overwhelming. Take a look at the new Inbox in VS Codeβs Agents window: see finished and active sessions at a glance, then filter by repository or environment to find the work you need. The feature is evolving, so check out the latest VS Code Insiders build and give it a try.
Learn more: https://code.visualstudio.com/updates/v1_147#_inbox-mode-improvements-experimental
Join this channel to get access to perks:
https://www.youtube.com/channel/UCENTmbKaTphpWV2R2evVz2A/join
π Buy some swag! - https://jamesmontemagno.myspreadshop.com/
βοΈ Buy me a coffee - https://www.buymeacoffee.com/jamesmontemagno
Follow:
π¨βπ» GitHub: https://github.com/jamesmontemagno
π¦ X: https://x.com/jamesmontemagno
π Website: https://www.montemagno.com
π° Newsletter: https://newsletter.montemagno.com/
Disclaimer: This channel, videos, and streams are created in my spare time and are a product of me... James Montemagno! They are NOT officially affiliated or endorsed by Microsoft (my employer) in any way. Opinions and views are my own.
What is on my hat? It is the CLE clothing logo because I am from Cleveland! Checkout their awesome CLE merch: https://cleclothingco.myshopify.com/
What is that art on my wall? It is an original piece from the French street artist Gregos of La Butte Montmartre: https://www.instagram.com/p/BceZ1oNHiQx/
My Setup:
βΉοΈ My Icons: https://marketplace.visualstudio.com/items?itemName=Catppuccin.catppuccin-vsc-icons
π· Canon M50 Mark II - https://amzn.to/3P8R7lp
π‘ Nanoleaf Elements Lights - https://amzn.to/3umwJVW
π Blue Spark Microphone - https://amzn.to/3qgtYkq
π Blue Pop Filter - https://amzn.to/3jEWM3r
π€³ Rode Microphone Arm - https://amzn.to/2Z68AlE
π§ Sony MDR7306 Headphones - https://amzn.to/372jxta
π² Stream Deck - https://amzn.to/373Uk1n
π± MX Master 2S Mouse - https://amzn.to/3d7J2gj
β¨οΈ Tecware Phantom Keyboard - https://amzn.to/3aUP4y9
Using links I provide I may receive a commission if you buy something which helps support the channel.
Ever notice some MSIX project source trees have a Package.appxmanifest file instead of AppxManifest.xml and wonder: Why, and how do they differ?
Package.appxmanifest is a templated variant of AppxManifest.xml.
Visual Studio packaging projects introduced the convention of Package.appxmanifest as a template, using placeholder tokens such as $targetnametoken$ and $targetentrypoint$. Packaging projects would read this file during their build, replace the placeholder tokens with appropriate values, and save the result in the build’s output directory1 as AppxManifest.xml. The generated AppxManifest.xml is the file ultimately consumed by the packaging toolchain.
For example, a Package.appxmanifest containing
...
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
...
could become an AppxManifest.xml with
...
<Application Id="App"
Executable="PointOfSale.exe"
EntryPoint="Contoso.PointOfSale.CardReader">
...
Package.appxmanifest is an AppxManifest.xml file, except some values have been replaced with template placeholders (and the filename differs).
That’s why you can edit Package.appxmanifest exactly as you would AppxManifest.xml. This is handy when Visual Studio doesn’t provide interactive UI or project properties to add or set manifest content for you. For example, there’s no VS feature to make a Framework package, but you can create one by directly editing Package.appxmanifest to add <Framework>true</Framework>
<Package...>
...
<Properties>
<Framework>true</Framework>
...
Visual Studio may not know how to add the <Framework> element to Package.appxmanifest, but it respects and preserves your edits.
This isn’t terribly surprising because the transformation from Package.appxmanifest to AppxManifest.xml is fundamentally a string-substitution process.
You can perform the same transformation yourself with a small script or program, provided you have the necessary input data.
For example, let’s write a script file SetVersion.ps1 to set the package’s version per the version in a file’s VERSIONINFO:
param(
[string]$From="Package.appxmanifest",
[string]$To="AppxManifest.xml",
[Parameter(Mandatory=$true)][string]$Exe
)
Set-StrictMode -Version 3.0
$ErrorActionPreference = "Stop"
$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo($exe).FileVersion
$manifest = [IO.File]::ReadAllText($From)
$manifest = "$manifest" -replace "#version#", "$version"
[IO.File]::WriteAllText($To, $manifest)
Now given a Package.appxmanifest file containing
<Package...>
..
<Identity...Version="#version#".../>
...
</Package>
and PointOfSale.exe containing version 2026.11.22.0 in its VERSIONINFO, we can run the command
pwsh.exe -File .\SetVersion.ps1 -NoProfile -NonInteractive -Exe C:\Contoso\bin\Release\x64\PointOfSale.exe
and voila! AppxManifest.xml has the matching version:
<Package...>
..
<Identity...Version="2026.11.22.0".../>
...
</Package>
Visual Studio initially created Package.appxmanifest, but the notion of a templated file transformed by a build process to the final product is as old as dirt. Modern MSIX projects typically perform the transformation through build targets, but the underlying idea remains the same: start with a template manifest, substitute build-specific values, and produce the final AppxManifest.xml.
1 For example, $(OutDir)\AppxManifest.xml
The post Package.appxmanifest vs AppxManifest.xml appeared first on Inside MSIX.
Azure Cosmos DB for NoSQL can now commit writes across partition keys, containers, and databases as one atomic unit. Distributed transactions are currently in public preview. Every operation commits, or none of them do.
Previously, applications that needed atomic operations across multiple logical partitions often relied on application-managed patterns such as sagas and compensating transactions. Distributed transactions move that coordination into Azure Cosmos DB, simplifying application logic while preserving all-or-nothing execution.
This blog explains the problem, introduces the API, and walks through the sample application, where Alice transfers money to Bob and the application records a ledger entry.
Alice sends Bob $150. That’s three different write operations: Alice’s balance goes down, Bob’s goes up, and a ledger entry records the transfer. If any one of them lands without the others, your books are wrong.

In the sample, those three items deliberately live in different places:

| Item | Container | Partition key value |
|---|---|---|
| Alice’s account | accounts | alice |
| Bob’s account | accounts | bob |
| Ledger entry | ledger | posting month, for example 2026-11 |
Both containers use /pk as the partition key path. The distributed transactions guide use the same banking /accounts/ledger shape.
Why were transactions previously limited to one logical partition?
Azure Cosmos DB scales by partitioning your data. Its ACID guarantees, with snapshot isolation, have always applied to operations within one logical partition key (learn more). Because Alice and Bob use different partition keys, the transfer crossed that boundary.

Applications typically used one of two approaches::
Transactional batch remains the best fit when the data model stays within one partition key. Distributed transactions address the cases that genuinely span partitions, containers, or databases.
Distributed transactions are atomic read or write transactions that span logical partitions, containers, and databases within one Azure Cosmos DB for NoSQL account and region.


How it works under the covers. Under the hood β Azure Cosmos DB coordinates a two-phase commit protocol across the participating partitions. During the preparation phase, participants validate and prepare their operations. Once all participants have successfully prepared, the service coordinates the commit. If preparation fails, the transaction is aborted. The benefit is that your team/application doesn’t run a coordinator and there is no need to orchestrate compensation logic anymore.

The sample application is built with .NET and uses the Azure Cosmos DB .NET SDK (Microsoft.Azure.Cosmos 3.64.0-preview.0) along with Azure.Identity for authentication.
CosmosClientOptions clientOptions = new()
{
MaxRetryAttemptsOnAbortedTransactions = 10,
MaxRetryWaitTimeOnAbortedTransactions = TimeSpan.FromSeconds(30)
};
TokenCredential credential = environment.IsDevelopment()
? new DefaultAzureCredential()
: string.IsNullOrWhiteSpace(managedIdentityClientId)
? new ManagedIdentityCredential()
: new ManagedIdentityCredential(managedIdentityClientId);
client = new CosmosClient(options.Endpoint, credential, clientOptions);
The sample uses the SDK’s default transaction retry settings, allowing up to 10 retries or 30 seconds of cumulative retry delay for transactions the service identifies as retriable. HTTP 429 throttling is handled separately through the SDK’s rate-limiting retry settings.
For authentication, the application uses DefaultAzureCredential during development and managed identity when deployed, avoiding the need to manage account keys. Access is controlled through Microsoft Entra ID RBAC, with the sample requiring the Cosmos DB Built-in Data Contributor role scoped to the /dbs/banking database.
The application also reuses a single CosmosClient instance, following recommended SDK practices. These choices align with the Azure Cosmos DB Agent Kit guidance for authentication, least-privilege access, and client management.
ItemResponse<CosmosAccount> alice = await ReadAccountAsync(AccountAId);
ItemResponse<CosmosAccount> bob = await ReadAccountAsync(AccountBId);
if (alice.Resource.Balance < amount) { /* client-side rejection */ }
using DistributedTransactionResponse response = await cosmosClient
.CreateDistributedWriteTransaction()
.PatchItem(accountsContainer, new PartitionKey(AccountAId), AccountAId,
[PatchOperation.Increment("/balance", -(double)amount)],
new DistributedTransactionPatchItemRequestOptions
{
IfMatchEtag = alice.ETag,
FilterPredicate = $"from c where c.balance >= {amountLiteral}"
})
.PatchItem(accountsContainer, new PartitionKey(AccountBId), AccountBId,
[PatchOperation.Increment("/balance", (double)amount)],
new DistributedTransactionPatchItemRequestOptions { IfMatchEtag = bob.ETag })
.CreateItem(ledgerContainer, new PartitionKey(entry.PartitionKey), entry.Id, entry)
.ExecuteTransactionAsync(cancellationToken);
Three things are worth calling out:
The application also checks Alice’s balance before it creates a write transaction. In the sample’s insufficient-funds scenario, a $500 transfer is rejected before any transaction is submitted.

Distributed transactions report one of two response modes. The all-or-nothing write guarantee is the same in both modes; the difference is when the client receives the response.
Both modes maintain the same atomicity and durability guarantees. FastResponse is particularly beneficial for write-intensive workloads where applications can continue processing without waiting for the final transaction outcome.
bool succeeded = response.IsSuccessStatusCode && response.All(operation => operation.IsSuccessStatusCode);
...
else if (response.ResponseMode == DistributedTransactionResponseMode.Standard)
message = successMessage;
else
message = " FastResponse received. Cosmos DB will continue processing the transaction.";
using DistributedTransactionResponse response = await cosmosClient
.CreateDistributedReadTransaction()
.ReadItem(accountsContainer, new PartitionKey(AccountAId), AccountAId)
.ReadItem(accountsContainer, new PartitionKey(AccountBId), AccountBId)
.ReadItem(ledgerContainer, new PartitionKey(ledgerPartitionKey), ledgerId)
.ExecuteTransactionAsync(cancellationToken);
One call reads Alice, Bob, and the ledger entry across two partitions and two containers from the same committed snapshot. Results are returned in request order through GetOperationResultAtIndex<T>(i).
The sample includes an optimistic-concurrency scenario: it stages a transfer, changes Alice’s account with an independent write, and then attempts to commit using the original ETags.


The follow-up query confirms the result: Alice is at 301 because of the independent write, Bob remains at 1,000, and the ledger contains only the earlier successful transfer. After a confirmed conflict, read fresh state and recalculate instead of replaying the stale proposal.
| Requirement | Details |
|---|---|
| API | NoSQL only |
| Throughput | Provisioned (manual or autoscale) |
| Regions | Public Azure region. Single-write regions only and multi-write region support is planned. |
| SDK | .NET v3 Microsoft.Azure.Cosmos 3.64.0-preview.0 or higher (other SDKs “coming soon”) |
| Enrollment | Request through the onboarding form; typically fulfilled in 1β2 business days |
| Limits | 100 operations, 2 MB per transaction |
Multi-region accounts: transactions are atomic within the write region. Committed changes replicate asynchronously to secondary regions. Depending on the configured consistency level and replication progress, readers in secondary regions can temporarily observe different versions of data across participating partitions.
Are distributed transactions in Azure Cosmos DB generally available? No. They’re in public preview, without an SLA, and behavior and limits might change before general availability (learn more).
Can a distributed transaction span two Azure Cosmos DB accounts? No. The documented scope is logical partitions, containers and databases within the same account and region.
Which SDKs support it? The .NET v3 SDK, starting at 3.64.0-preview.0. Support for other SDKs is coming soon.
What happens if one operation fails? The transaction aborts and none of its writes are applied. In the sample’s ETag conflict, Alice’s operation returns 412 (Precondition Failed); the overall transaction can return 452 to indicate that it was aborted. Bob is not credited, and no ledger entry is written (sample).
Do I still need transactional batch? Yes. Use it when all items share one logical partition key in one container (learn more).
How do I authenticate without keys? Use Microsoft Entra ID with DefaultAzureCredential or a managed identity. The identity must have data-plane permissions on every participating container; in the sample, Cosmos DB Built-in Data Contributor is scoped to /dbs/banking (learn more, sample).
Azure Cosmos DB is a fully managed and serverless NoSQL and vector database for modern app development, including AI applications. With its SLA-backed speed and availability as well as instant dynamic scalability, it is ideal for real-time NoSQL applications that require high performance and distributed computing over massive volumes of NoSQL and vector data.
To stay in the loop on Azure Cosmos DB updates, follow us on X, YouTube, and LinkedIn.
The post All or nothing: distributed transactions in Azure Cosmos DB appeared first on Azure Cosmos DB Blog.