docs: 更新文档中的 .NET Framework 版本为 4.6.2

- 更新 README.md 中的技术栈、系统要求和编译输出路径
- 更新 BUILD_INSTALLER.md 中的兼容性说明和下载链接
- 更新轻量级订单发货客户端方案.md 中的所有版本引用
- 更新 build_installer.bat 自动编译和复制流程
- 修复 App.config 中的 supportedRuntime 版本

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Administrator
2025-12-18 11:41:46 +08:00
parent 9b11baba63
commit e7b9d3851c
5 changed files with 110 additions and 18 deletions

74
BUILD_INSTALLER.md Normal file
View File

@@ -0,0 +1,74 @@
# 构建安装包说明
## Windows 7 兼容性
本应用程序使用 .NET Framework 4.6.2,支持以下系统:
- Windows 7 SP1原生支持 .NET Framework 4.6.2
- Windows 8.1(自带 .NET Framework 4.6.2+
- Windows 10自带 .NET Framework 4.6.2+
- Windows 11自带 .NET Framework 4.6.2+
## 方式一:使用 Inno Setup 创建安装程序(推荐)
### 步骤 1安装 Inno Setup
1. 下载 Inno Setup 6https://jrsoftware.org/isdl.php
2. 安装时选择包含 **中文简体语言包**
### 步骤 2编译安装程序
**方法 A - 命令行编译:**
```cmd
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" setup.iss
```
**方法 B - 图形界面:**
1. 双击打开 `setup.iss` 文件
2.`Ctrl+F9` 或点击菜单 `Build > Compile`
### 步骤 3获取安装包
编译完成后,安装包位于:
```
installer\PackagingMallShipper_Setup_v1.0.0.exe
```
## 方式二:手动分发(无需安装程序)
`publish` 文件夹的内容复制给用户:
```
publish/
├── PackagingMallShipper.exe (主程序)
├── PackagingMallShipper.exe.config (配置文件)
├── x64/
│ └── SQLite.Interop.dll (64位SQLite库)
└── x86/
└── SQLite.Interop.dll (32位SQLite库)
```
用户需要 .NET Framework 4.6.2+ 运行时Windows 7 SP1 原生支持)。
## .NET Framework 4.6.2 下载地址
如果目标系统没有安装 .NET Framework 4.6.2,可从以下地址下载:
**离线安装包(推荐):**
https://dotnet.microsoft.com/download/dotnet-framework/net462
**在线安装包:**
https://dotnet.microsoft.com/download/dotnet-framework/thank-you/net462-web-installer
## Windows 7 注意事项
Windows 7 SP1 用户:
1. 确保已安装 Windows 7 Service Pack 1
2. .NET Framework 4.6.2 通常已通过 Windows Update 安装
3. 如未安装,可下载离线安装包(约 60MB
## 文件说明
| 文件 | 说明 |
|------|------|
| `setup.iss` | Inno Setup 安装脚本 |
| `publish/` | 编译好的程序文件 |
| `installer/` | 生成的安装包输出目录 |

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup> </startup>
<appSettings> <appSettings>
<!-- API工厂配置 --> <!-- API工厂配置 -->

View File

@@ -17,7 +17,7 @@
| 组件 | 技术 | 版本 | | 组件 | 技术 | 版本 |
|-----|------|------| |-----|------|------|
| 桌面框架 | WPF | .NET Framework 4.8 | | 桌面框架 | WPF | .NET Framework 4.6.2 |
| 架构模式 | MVVM | CommunityToolkit.Mvvm 8.2 | | 架构模式 | MVVM | CommunityToolkit.Mvvm 8.2 |
| 本地数据库 | SQLite | System.Data.SQLite 1.0.118 | | 本地数据库 | SQLite | System.Data.SQLite 1.0.118 |
| Excel处理 | ClosedXML | 0.102.2 | | Excel处理 | ClosedXML | 0.102.2 |
@@ -26,13 +26,13 @@
## 系统要求 ## 系统要求
- **操作系统**: Windows 7 SP1 或更高版本 - **操作系统**: Windows 7 SP1 或更高版本
- **运行时**: .NET Framework 4.8Win7已内置,无需额外安装 - **运行时**: .NET Framework 4.6.2Win7 SP1 原生支持
- **磁盘空间**: ~10MB - **磁盘空间**: ~10MB
## 开发环境 ## 开发环境
- Visual Studio 2019+ 或 .NET SDK 8.0+ - Visual Studio 2019+ 或 .NET SDK 8.0+
- .NET Framework 4.8 开发工具 - .NET Framework 4.6.2+ 开发工具
## 编译步骤 ## 编译步骤
@@ -43,7 +43,7 @@
dotnet build PackagingMallShipper.sln -c Release dotnet build PackagingMallShipper.sln -c Release
# 输出文件位于 # 输出文件位于
bin/Release/net48/PackagingMallShipper.exe bin/Release/net462/PackagingMallShipper.exe
``` ```
### 方式二Visual Studio ### 方式二Visual Studio
@@ -52,7 +52,7 @@ bin/Release/net48/PackagingMallShipper.exe
2. 还原 NuGet 包 2. 还原 NuGet 包
3. 选择 `Release` 配置 3. 选择 `Release` 配置
4. 生成解决方案 4. 生成解决方案
5. 输出文件位于 `bin/Release/net48/` 目录 5. 输出文件位于 `bin/Release/net462/` 目录
## 配置说明 ## 配置说明

View File

@@ -26,17 +26,35 @@ if "%ISCC%"=="" (
echo [Info] Found Inno Setup: %ISCC% echo [Info] Found Inno Setup: %ISCC%
echo. echo.
echo [Step 1] Building Release version...
dotnet build -c Release
if %ERRORLEVEL% NEQ 0 (
echo [Error] Build failed!
pause
exit /b 1
)
echo.
echo [Step 2] Copying files to publish folder...
if not exist "publish" mkdir publish
if not exist "publish\x64" mkdir publish\x64
if not exist "publish\x86" mkdir publish\x86
copy /Y "PackagingMallShipper\bin\Release\net462\PackagingMallShipper.exe" "publish\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\PackagingMallShipper.exe.config" "publish\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\x64\SQLite.Interop.dll" "publish\x64\" >nul
copy /Y "PackagingMallShipper\bin\Release\net462\x86\SQLite.Interop.dll" "publish\x86\" >nul
if not exist "publish\PackagingMallShipper.exe" ( if not exist "publish\PackagingMallShipper.exe" (
echo [Error] publish\PackagingMallShipper.exe not found echo [Error] publish\PackagingMallShipper.exe not found
echo. echo.
echo Please build Release version first:
echo dotnet build -c Release
echo.
pause pause
exit /b 1 exit /b 1
) )
echo [Info] Files copied to publish folder
echo.
echo [Info] Compiling installer... echo [Step 3] Compiling installer...
echo. echo.
"%ISCC%" setup.iss "%ISCC%" setup.iss

View File

@@ -44,7 +44,7 @@
| 层级 | 选型 | 版本 | 理由 | | 层级 | 选型 | 版本 | 理由 |
|-----|------|------|------| |-----|------|------|------|
| **桌面框架** | WPF | .NET Framework 4.8 | Win7原生支持、性能极佳、微软官方维护 | | **桌面框架** | WPF | .NET Framework 4.6.2 | Win7原生支持、性能极佳、微软官方维护 |
| **开发语言** | C# | 7.3 | 强类型、性能优秀、生态成熟 | | **开发语言** | C# | 7.3 | 强类型、性能优秀、生态成熟 |
| **UI风格** | Modern WPF | MaterialDesign/MahApps | 现代Windows风格 | | **UI风格** | Modern WPF | MaterialDesign/MahApps | 现代Windows风格 |
| **架构模式** | MVVM | CommunityToolkit.Mvvm | 解耦视图与逻辑 | | **架构模式** | MVVM | CommunityToolkit.Mvvm | 解耦视图与逻辑 |
@@ -53,10 +53,10 @@
| **HTTP客户端** | HttpClient | 内置 | 原生支持、异步友好 | | **HTTP客户端** | HttpClient | 内置 | 原生支持、异步友好 |
| **JSON处理** | Newtonsoft.Json | 13.x | 功能强大、兼容性好 | | **JSON处理** | Newtonsoft.Json | 13.x | 功能强大、兼容性好 |
### 2.2 为什么选择 WPF + .NET Framework 4.8 ### 2.2 为什么选择 WPF + .NET Framework 4.6.2
``` ```
✅ Win7原生支持 - Windows 7 SP1 已内置 .NET Framework 4.8,无需安装运行时 ✅ Win7原生支持 - Windows 7 SP1 已内置 .NET Framework 4.6.2,无需安装运行时
✅ 性能极佳 - 原生编译,启动时间 <1秒 ✅ 性能极佳 - 原生编译,启动时间 <1秒
✅ 内存占用低 - ~50MBvs Electron ~200MB ✅ 内存占用低 - ~50MBvs Electron ~200MB
✅ 包体极小 - ~5MBvs Electron ~150MB ✅ 包体极小 - ~5MBvs Electron ~150MB
@@ -106,7 +106,7 @@
``` ```
┌─────────────────────────────────────────────────────────────┐ ┌─────────────────────────────────────────────────────────────┐
│ 桌面客户端 (WPF + .NET Framework 4.8) │ │ 桌面客户端 (WPF + .NET Framework 4.6.2) │
├─────────────────────────────────────────────────────────────┤ ├─────────────────────────────────────────────────────────────┤
│ 视图层 (Views/XAML) │ │ 视图层 (Views/XAML) │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
@@ -138,7 +138,7 @@
```csharp ```csharp
// ViewModel -> View 数据绑定示例 // ViewModel -> View 数据绑定示例
// 使用 CommunityToolkit.Mvvm (兼容 .NET Framework 4.8) // 使用 CommunityToolkit.Mvvm (兼容 .NET Framework 4.6.2)
using CommunityToolkit.Mvvm.ComponentModel; using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input; using CommunityToolkit.Mvvm.Input;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
@@ -1477,7 +1477,7 @@ public class ShipOrderRequest
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>PackagingMallShipper</RootNamespace> <RootNamespace>PackagingMallShipper</RootNamespace>
<AssemblyName>PackagingMallShipper</AssemblyName> <AssemblyName>PackagingMallShipper</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<LangVersion>7.3</LangVersion> <LangVersion>7.3</LangVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
@@ -1560,7 +1560,7 @@ public class ShipOrderRequest
| 风险 | 概率 | 影响 | 对策 | | 风险 | 概率 | 影响 | 对策 |
|-----|:----:|:----:|------| |-----|:----:|:----:|------|
| API工厂接口变更 | 低 | 高 | 封装API层便于统一修改 | | API工厂接口变更 | 低 | 高 | 封装API层便于统一修改 |
| Win7特殊兼容问题 | 低 | 低 | .NET Framework 4.8 原生支持,风险极低 | | Win7特殊兼容问题 | 低 | 低 | .NET Framework 4.6.2 原生支持,风险极低 |
| SQLite性能瓶颈 | 低 | 中 | 添加索引,分页查询,异步操作 | | SQLite性能瓶颈 | 低 | 中 | 添加索引,分页查询,异步操作 |
| 离线发货冲突 | 中 | 中 | 发货前先同步,提示用户确认 | | 离线发货冲突 | 中 | 中 | 发货前先同步,提示用户确认 |
| VS2019 在 Win7 卡顿 | 中 | 低 | 关闭不必要的扩展,使用轻量配置 | | VS2019 在 Win7 卡顿 | 中 | 低 | 关闭不必要的扩展,使用轻量配置 |
@@ -1639,7 +1639,7 @@ public class ExpressCompany
运行环境要求: 运行环境要求:
- Windows 7 SP1 或更高版本 - Windows 7 SP1 或更高版本
- .NET Framework 4.8Win7 已内置,无需单独安装) - .NET Framework 4.6.2Win7 已内置,无需单独安装)
文件清单: 文件清单:
├── PackagingMallShipper.exe # 主程序 ├── PackagingMallShipper.exe # 主程序