如何更新 Doconut
遵循以下步骤将版本 1.0.5.2 或以下更新。
.NET 框架 4.7
Web.config 配置
查看器需要通过 web.config 文件注册 HttpHandler。根据您的 IIS 版本,可以使用以下在 web.config 中定义的部分来完成注册。
低于 IIS 7:
xml
<httpHandlers>
<add verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</httpHandlers>IIS 7 及以上:
xml
<handlers>
<add name="DocImage" verb="GET,POST" path="DocImage.axd" type="Doconut.DocImageHandler, Doconut" />
</handlers>更新 ASPX 页面中的 Register
更改 ASPX 页面中的程序集注册。
旧:
aspx
<%@ Register Assembly="DocumentViewer" Namespace="DotnetDaddy.DocumentViewer" TagPrefix="asp" %>新:
aspx
<%@ Register Assembly="Doconut" Namespace="Doconut" TagPrefix="asp" %>更新控件标签
将控件标签从 DocViewer 更新为 Viewer。
旧:
aspx
<asp:DocViewer ID="ctlDoc" runat="server"/>新:
aspx
<asp:Viewer ID="ctlDoc" runat="server"/>更新命名空间
Doconut 24.3.0 重命名了命名空间。添加新的 DLL:Doconut.dll、Doconut.Formats.dll、Doconut.Configs.dll 和 Doconut.Clouds.dll。
新 using:
csharp
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;初始化:
csharp
var viewer = new Viewer();包依赖
- Newtonsoft.Json 13.0.3
- System.Text.Encoding.CodePages 6.0.0
- System.Text.Json 6.0.0
.NET 标准 / 核心
更新命名空间
Doconut 24.3.0 重命名了命名空间。添加新的 DLL:Doconut.dll、Doconut.Formats.dll、Doconut.Configs.dll 和 Doconut.Clouds.dll。
新 using:
csharp
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;初始化:
csharp
var viewer = new Viewer();包依赖
- Microsoft.Extensions.Caching.Abstractions 3.1.10
- SkiaSharp 2.88.6
- Newtonsoft.Json 13.0.3
- System.Drawing.Common 6.0.0
- System.Text.Json 6.0.0
- System.Text.Encoding.CodePages 7.0.0
.NET 6 或更高
更新命名空间
Doconut 24.3.0 重命名了命名空间。添加新的 DLL:Doconut.dll、Doconut.Formats.dll、Doconut.Configs.dll 和 Doconut.Clouds.dll。
新 using:
csharp
using Doconut;
using Doconut.Configs;
using Doconut.Formats;
using Doconut.Clouds;初始化:
csharp
var viewer = new Viewer();包依赖
- Microsoft.Extensions.Caching.Abstractions 3.1.10
- Newtonsoft.Json 13.0.3
- SkiaSharp 2.88.6
- System.Drawing.Common 7.0.0
- System.Text.Encoding.CodePages 7.0.0
此页面对您有帮助吗?