Reapply "feat:Downgrade to .NET Framework 4.6.2 project (#415)"

This reverts commit 25dc6a00d3.
This commit is contained in:
2026-04-05 10:53:42 +08:00
parent 25dc6a00d3
commit e02449e4aa
8 changed files with 20 additions and 19 deletions
+2 -2
View File
@@ -46,7 +46,7 @@ jobs:
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
$exePath = "Ink Canvas\bin\Debug\${{ matrix.architecture }}\net462\InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -74,7 +74,7 @@ jobs:
uses: actions/upload-artifact@v7
with:
name: InkCanvasForClass.CE.debug.${{ matrix.architecture }}
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net472/*"
path: "Ink Canvas/bin/Debug/${{ matrix.architecture }}/net462/*"
- name: Create Summary
if: always()
+3 -3
View File
@@ -236,7 +236,7 @@ jobs:
- name: Check if exe file is generated
id: check-exe
run: |
$exePath = "Ink Canvas\bin\Release\${{ matrix.architecture }}\net472\InkCanvasForClass.exe"
$exePath = "Ink Canvas/bin/Release/${{ matrix.architecture }}/net462/InkCanvasForClass.exe"
if (Test-Path $exePath) {
echo "build_success=true" >> $env:GITHUB_OUTPUT
@@ -283,8 +283,8 @@ jobs:
# 创建发布目录
New-Item -ItemType Directory -Path "release" -Force
# 复制发布文件(使用架构特定的路径)
Copy-Item "Ink Canvas\bin\Release\$architecture\net472\*" "release/" -Recurse -Force
# 复制发布文件
Copy-Item "Ink Canvas/bin/Release/$architecture/net462/*" "release/" -Recurse -Force
# 创建压缩包
Compress-Archive -Path "release/*" -DestinationPath $archiveName -Force
+2 -1
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</configuration>
+1 -1
View File
@@ -302,7 +302,7 @@ namespace Ink_Canvas.Helpers
/// <returns>派生出的密钥字节数组,长度等于 <paramref name="keyBytes"/>。</returns>
private static byte[] DeriveKey(string password, byte[] salt, int keyBytes)
{
// 注意:Rfc2898DeriveBytes 在 net472 默认 HMACSHA1
// 注意:Rfc2898DeriveBytes 在 net462 默认 HMACSHA1
using (var kdf = new Rfc2898DeriveBytes(password, salt, Pbkdf2Iterations))
{
return kdf.GetBytes(keyBytes);
+1 -1
View File
@@ -4,7 +4,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Ink_Canvas</RootNamespace>
<AssemblyName>InkCanvasForClass</AssemblyName>
<TargetFramework>net472</TargetFramework>
<TargetFramework>net462</TargetFramework>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+8 -8
View File
@@ -1,7 +1,7 @@
{
"version": 1,
"dependencies": {
".NETFramework,Version=v4.7.2": {
".NETFramework,Version=v4.6.2": {
"AForge.Imaging": {
"type": "Direct",
"requested": "[2.2.5, )",
@@ -92,7 +92,7 @@
"resolved": "1.0.3",
"contentHash": "vUc9Npcs14QsyOD01tnv/m8sQUnGTGOw1BCmKcv77LBJY7OxhJ+zJF7UD/sCL3lYNFuqmQEVlkfS4Quif6FyYg==",
"dependencies": {
"Microsoft.NETFramework.ReferenceAssemblies.net472": "1.0.3"
"Microsoft.NETFramework.ReferenceAssemblies.net462": "1.0.3"
}
},
"Microsoft.Office.Interop.PowerPoint": {
@@ -198,10 +198,10 @@
"System.Threading.Tasks.Extensions": "4.5.4"
}
},
"Microsoft.NETFramework.ReferenceAssemblies.net472": {
"Microsoft.NETFramework.ReferenceAssemblies.net462": {
"type": "Transitive",
"resolved": "1.0.3",
"contentHash": "0E7evZXHXaDYYiLRfpyXvCh+yzM2rNTyuZDI+ZO7UUqSc6GfjePiXTdqJGtgIKUwdI81tzQKmaWprnUiPj9hAw=="
"contentHash": "IzAV30z22ESCeQfxP29oVf4qEo8fBGXLXSU6oacv/9Iqe6PzgHDKCaWfwMBak7bSJQM0F5boXWoZS+kChztRIQ=="
},
"Microsoft.Win32.Registry": {
"type": "Transitive",
@@ -332,7 +332,7 @@
"contentHash": "okurQJO6NRE/apDIP23ajJ0hpiNmJ+f0BwOlB/cSqTLQlw5upkf+5+96+iG2Jw40G1fCVCyPz/FhIABUjMR+RQ=="
}
},
".NETFramework,Version=v4.7.2/win": {
".NETFramework,Version=v4.6.2/win": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -361,7 +361,7 @@
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
}
},
".NETFramework,Version=v4.7.2/win-arm64": {
".NETFramework,Version=v4.6.2/win-arm64": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -390,7 +390,7 @@
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
}
},
".NETFramework,Version=v4.7.2/win-x64": {
".NETFramework,Version=v4.6.2/win-x64": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
@@ -419,7 +419,7 @@
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
}
},
".NETFramework,Version=v4.7.2/win-x86": {
".NETFramework,Version=v4.6.2/win-x86": {
"Microsoft.Win32.Registry": {
"type": "Transitive",
"resolved": "5.0.0",
+1 -1
View File
@@ -55,7 +55,7 @@
4. 如果上述方法不能解决你的问题,请参考这个链接[【点击此处以跳转】](https://www.inkeys.top/tutorial/ppt-com.html)
### 程序无法正常启动
请检查你的电脑上是否安装了 `.Net Framework 4.7.2` 或更高版本。若没有,请[前往官网](https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net472-offline-installer "下载 .Net Framework 4.7.2")下载安装。
请检查你的电脑上是否安装了 `.Net Framework 4.6.2` 或更高版本。若没有,请[前往官网](https://dotnet.microsoft.com/zh-cn/download/dotnet-framework/thank-you/net462-offline-installer "下载 .Net Framework 4.6.2")下载安装。
如果仍无法运行,请[安装 `Microsoft Office`](https://www.coolhub.top/archives/11)。
+2 -2
View File
@@ -63,8 +63,8 @@ Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: de
function InitializeSetup: Boolean;
begin
Result := True; // Always allow setup to continue
if not IsDotNetInstalled(net472, 0) then // Check if .NET Framework version 4.7.2 or compatible is installed
SuppressibleMsgBox('警告:未检测到 .NET Framework 4.7.2 或更高版本。应用程序可能无法正常运行。', mbInformation, MB_OK, IDOK);
if not IsDotNetInstalled(net462, 0) then // Check if .NET Framework version 4.6.2 or compatible is installed
SuppressibleMsgBox('警告:未检测到 .NET Framework 4.6.2 或更高版本。应用程序可能无法正常运行。', mbInformation, MB_OK, IDOK);
end;
[Run]