ZYC.Framework.Alpha
1.6.4
dotnet add package ZYC.Framework.Alpha --version 1.6.4
NuGet\Install-Package ZYC.Framework.Alpha -Version 1.6.4
<PackageReference Include="ZYC.Framework.Alpha" Version="1.6.4" />
<PackageVersion Include="ZYC.Framework.Alpha" Version="1.6.4" />
<PackageReference Include="ZYC.Framework.Alpha" />
paket add ZYC.Framework.Alpha --version 1.6.4
#r "nuget: ZYC.Framework.Alpha, 1.6.4"
#:package ZYC.Framework.Alpha@1.6.4
#addin nuget:?package=ZYC.Framework.Alpha&version=1.6.4
#tool nuget:?package=ZYC.Framework.Alpha&version=1.6.4
ZYC.Framework.Alpha
ZYC.Framework
A high-performance, modular, and extensible desktop automation framework built with .NET 10 and WPF.
ZYC.Framework integrates .NET Aspire for distributed application orchestration and supports a hybrid UI approach using WebView2 and Blazor, enabling flexible composition of native desktop and web-based experiences.
Key Features
- Modular, plugin-based architecture (dynamic loading, independent development)
- WPF desktop host with multi-workspace and multi-tab UI patterns
- Hybrid UI: WebView2 embedding + Blazor UI reuse
- Built-in task management, global exception handling, and localization support
- Aspire-ready orchestration and service management
Quick Start
See: docs/quick-start.md
Links
- Repository: https://github.com/ZiYuCai1984/ZYC.Framework
- NuGet: https://www.nuget.org/packages/ZYC.Framework.Alpha
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- ZYC.CoreToolkit (>= 4.0.5)
- ZYC.CoreToolkit.Extensions.Autofac (>= 4.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.6.4 | 83 | 11/21/2026 |
| 1.6.3 | 80 | 11/20/2026 |
| 1.6.2 | 123 | 11/16/2026 |
| 1.6.1 | 105 | 11/4/2026 |
| 1.6.0 | 120 | 10/29/2026 |
| 1.5.9 | 109 | 10/23/2026 |
| 1.5.8 | 105 | 10/20/2026 |
| 1.5.7 | 112 | 10/17/2026 |
| 1.5.6 | 111 | 10/12/2026 |
| 1.5.5 | 114 | 10/11/2026 |
| 1.5.4 | 102 | 10/9/2026 |
| 1.5.3 | 117 | 10/7/2026 |
| 1.5.2 | 115 | 10/2/2026 |
| 1.5.1 | 116 | 10/1/2026 |
| 1.5.0 | 115 | 9/26/2026 |
| 1.4.9 | 182 | 9/19/2026 |
| 1.4.7 | 173 | 9/7/2026 |
| 1.4.6 | 128 | 9/1/2026 |
| 1.4.5 | 137 | 8/29/2026 |
| 1.4.4 | 134 | 8/20/2026 |
# 🚀 Release Notes - Version 1.6.4
**Release Date:** 2026-11-21
---
## 🆕 New Features
* Added a typed web bridge for pages hosted in WebView2. Mark an interface with `[ExposeToWeb]` (`ZYC.Framework.Abstractions.Web`) and register its implementation in the DI container; `WebBridge` (`ZYC.Framework.WebView2`) then dispatches the calls a page sends with `postMessage` to that service and returns the result or the error message. Arguments and results are camelCase JSON with enums as strings, `Task`/`ValueTask` results are awaited, and a `CancellationToken` parameter receives `CancellationToken.None`. The service name defaults to the interface name without its leading `I`; set `[ExposeToWeb(Name = "...")]` to change it. Overloaded methods are not supported.
* Added the `zyc web-types` command, which generates TypeScript declarations for the `[ExposeToWeb]` interfaces of the given assemblies: `zyc web-types --assembly <path.dll> --output <file.d.ts>`. The output file is only rewritten when its content changes. The command reads assembly metadata only, so it can run against a host output folder.
* The `react` project template now calls C# services with types, for example `await hostService('GreetingService').greetAsync('React')`. It includes a sample `Services/IGreetingService.cs` marked with `[ExposeToWeb]` and `[ExposeToMCP]`, so the same interface serves C# code, the MCP server, and the page. The view passes page messages to `WebBridge`, and every build regenerates `ClientApp/src/host-services.d.ts` from the `[ExposeToWeb]` interfaces.
> ⚠️ Only pass messages from pages you trust to `WebBridge` (check `CoreWebView2WebMessageReceivedEventArgs.Source`): every `[ExposeToWeb]` interface becomes callable by the page. The `react` template only forwards messages from the page it loaded.
---
## 🛠 Improvements
* `AppConfig.IconPath` now defaults to an empty string instead of `null`.
---
## 🐛 Fixes
* Fixed the host's main window not always becoming `Application.MainWindow`. A window constructed by a module during `LoadAsync` (for example, a tab item factory that injects `IAppBusyWindow`) became `MainWindow` instead, which broke `LifetimeScopeResource` because it reads the lifetime scope from `MainWindow.DataContext`. The host now sets `MainWindow` explicitly.
* Fixed `TabItemInstanceBase.Dispose` creating the view of a tab item whose view had never been created, only to dispose it.
* Fixed the plugins button in the WebView2 menu bar staying disabled when its command was evaluated before the browser extension list was bound.
* Fixed the CLI logging `System.String[]` instead of the file name when it ignores a module assembly.
---
## 🔄 Compatibility
* In projects created from the `react` template, `ClientApp/src/webview.ts` now exports `callHost` and `hostService` instead of `postToHost` and `onHostMessage`, and the `ping`/`pong` sample is replaced by the `GreetingService` call. The build also runs `ZYC.Framework.CLI.exe web-types` after every build, including with `-p:SkipClientAppBuild=true`. Projects created with earlier versions are not affected.
---
## 📦 Installation
```bash
dotnet add package ZYC.Framework.Alpha --version 1.6.4
dotnet tool install --global ZYC.Framework.CLI --version 1.6.4
```
---
## 📚 Resources
* 📖 [Documentation](https://ziyucai1984.github.io/blob/zyc-framework/README.html)
* 🐞 [Report an Issue](https://github.com/ZiYuCai1984/ZYC.Framework/issues)
---
**Thank you for trying out ZYC.Framework.Alpha!**
Your feedback will help shape future releases.