首页›.NET Blog›文章

AI is Changing the Cross-Platform Decision Matrix

David Ortinau · 2026年11月20日

AI 摘要 AI 生成,可能有误

作者进行了一项实验:使用 AI 编程代理,基于共享的 C# 库,用平台专属 UI 重建了一个 .NET MAUI 应用的 iOS 和 Android 界面,以评估 AI 代理如何改变跨平台技术的选型决策。这次由代理驱动的重写花费的人工时间不到四小时,且平台 UI 版本在运行时的表现优于 .NET MAUI(Android 上启动速度约快 50%,iOS 上约快 35%,安装包也更小),不过为两个 UI 各添加一项功能所耗费的执行工作模型时间约为单一 MAUI 版本的 1.4 倍。关键发现是:AI 代理让构建第二个 UI 变得廉价,但拥有并验证它仍需承担真实的成本——协调代理所消耗的模型时间甚至超过了两个实现工作模型的总和。

How you build a cross-platform app has always come down to a few hard constraints. Over the years I’ve talked with a lot of teams about how they chose their approach, and the factors are consistent: what the team already knows, how many codebases it has the capacity to support, what it costs to build and to maintain, solution characteristics like app size and performance, and the health of the ecosystem and support behind the stack.

Many of you reevaluate your technology investment choice on at least an annual basis. In 2026 there’s a major new factor to consider: AI coding agents.

Today the first two factors, team knowledge and team capacity, look different. A well-configured GitHub Copilot can write UIKit or Android Views whether or not anyone on your team has, and it doesn’t mind writing the same screen twice. Does that flatten the playing field between fully cross-platform and fully platform-specific, or is there still value in choosing a single stack to reach multiple platforms?

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 .NET Blog

Build a .NET decision agent with Microsoft Agent Framework and Foundry

AI 摘要The article walks through building a .NET agent that uses the Microsoft-Decision-1.1 decision model to route support tickets to the appropriate team, demonstrating that agents don't require conversational models to be useful. It shows how to implement the decision logic inside a Microsoft Agent Framework AIAgent, return structured results as typed C# records, and expose the agent through the Foundry Responses protocol. The same implementation can run locally with Azure CLI credentials or be hosted in Foundry using managed identity.

Introducing DocumentExtractionClient (preview): Extract documents in .NET

AI 摘要Microsoft has introduced a preview of DocumentExtractionClient in Microsoft.Extensions.DocumentExtraction, a unified .NET API that extracts structured content (headings, paragraphs, tables, figures, and sources) from PDFs, scans, images, and Office files. Starter providers in the .NET AI Community Toolkit—including PdfPig, vision language models via IChatClient, Azure Content Understanding, Azure AI Document Intelligence, and Mistral OCR—are interchangeable, so code can swap providers without rewrites, following the familiar IChatClient pattern with support for middleware and custom providers. Extracted documents can feed into Microsoft.Extensions.DataIngestion pipelines to power context engineering, agentic workflows, and retrieval-augmented generation (RAG), with single-file C# samples available in a GitHub repository.

Run local models in your .NET apps with Llama on Windows

AI 摘要Llama on Windows is a free, open-source system tray app built by the Hugging Face and llama.cpp teams that lets you find, download, and chat with open AI models running locally on your PC. It manages a llama.cpp server on localhost that exposes an OpenAI-compatible API, so .NET apps can call local models using the familiar OpenAI client libraries and Microsoft.Extensions.AI's IChatClient, with no API key required. The article walks through installing Llama, downloading a model, and building a .NET 11 file-based chat app with streaming responses and tool calling.

Introducing staged publishing on NuGet.org

AI 摘要NuGet.org has introduced staged publishing, a feature that lets package publishers upload packages privately for validation—such as malware scanning and signature checks—before an authorized maintainer explicitly promotes them to the public feed. Unlike unlisted packages, staged packages are completely unavailable to consumers, and publishers can organize related packages into staging groups for release-level review, with promotion requiring a signed-in authorized user with two-factor authentication. The feature is opt-in, supported in the .NET 11 RC2 SDK via a new stage push CLI command, and is recommended for security fixes awaiting coordinated disclosure, feature releases, and large updates, ideally combined with Trusted Publishing and staging-only credentials so compromised pipeline credentials cannot publish directly.

Announcing .NET 11

AI 摘要Microsoft has announced the release of .NET 11, a Standard Term Support release with two years of support, featuring improvements across C# 15 (including union types and closed hierarchies), ASP.NET Core, .NET MAUI, runtime performance, and SDK tooling. The release emphasizes AI-powered development with Microsoft.Extensions.AI, MCP server templates, and the Microsoft Agent Framework, alongside library enhancements such as Zstandard compression, expanded Process APIs, and new JSON capabilities. Developers can learn more at .NET Conf 2026, held November 10-13.