[研究]ClosedXML 0.105.0 是否相依 System.ValueTuple 測試
2025-04-07
環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 20.2
續這篇
[研究]System.ValueTuple 4.5.0 升級到 4.6.x 後執行出錯
https://shaurong.blogspot.com/2026/04/systemvaluetuple-450-46x.html
********************************************************************************
NuGet 安裝ClosedXML 0.105.0
********************************************************************************
WebApplication1
正在安裝:
DocumentFormat.OpenXml.Framework.3.1.1
DocumentFormat.OpenXml.3.1.1
ExcelNumberFormat.1.1.0
Microsoft.Bcl.HashCode.1.1.1
RBush.Signed.4.0.0
System.Buffers.4.5.1
System.Numerics.Vectors.4.5.0
System.Runtime.CompilerServices.Unsafe.4.7.0
System.Memory.4.5.5
ClosedXML.Parser.2.0.0
SixLabors.Fonts.1.0.0
ClosedXML.0.105.0
********************************************************************************
更新
********************************************************************************
WebApplication1
更新:
SixLabors.Fonts.1.0.0 -> SixLabors.Fonts.2.1.3
System.Memory.4.5.5 -> System.Memory.4.6.3
System.Runtime.CompilerServices.Unsafe.4.7.0 -> System.Runtime.CompilerServices.Unsafe.6.1.2
System.Numerics.Vectors.4.5.0 -> System.Numerics.Vectors.4.6.1
System.Buffers.4.5.1 -> System.Buffers.4.6.1
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1 -> Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0
Microsoft.Bcl.HashCode.1.1.1 -> Microsoft.Bcl.HashCode.6.0.0
DocumentFormat.OpenXml.3.1.1 -> DocumentFormat.OpenXml.3.5.1
DocumentFormat.OpenXml.Framework.3.1.1 -> DocumentFormat.OpenXml.Framework.3.5.1
********************************************************************************
下面,編譯失敗
********************************************************************************
嚴重性 程式碼 說明 專案 檔案 行 隱藏項目狀態
錯誤 無法安裝封裝 'SixLabors.Fonts 2.1.3'。您正嘗試將此封裝安裝到以 '.NETFramework,Version=v4.8' 為目標的專案,但該封裝不包含任何與架構相容的組件參考或內容檔。如需詳細資訊,請連絡封裝作者。
********************************************************************************
SixLabors.Fonts 2.1.3 不支援 .NET Framework 4.8(或沒有提供可用的 compatible assets)
********************************************************************************
不要升級 SixLabors.Fonts 2.1.3,其他再升級一次
********************************************************************************
WebApplication1
更新:
System.Memory.4.5.5 -> System.Memory.4.6.3
System.Runtime.CompilerServices.Unsafe.4.7.0 -> System.Runtime.CompilerServices.Unsafe.6.1.2
System.Numerics.Vectors.4.5.0 -> System.Numerics.Vectors.4.6.1
System.Buffers.4.5.1 -> System.Buffers.4.6.1
Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1 -> Microsoft.CodeDom.Providers.DotNetCompilerPlatform.4.1.0
Microsoft.Bcl.HashCode.1.1.1 -> Microsoft.Bcl.HashCode.6.0.0
DocumentFormat.OpenXml.3.1.1 -> DocumentFormat.OpenXml.3.5.1
DocumentFormat.OpenXml.Framework.3.1.1 -> DocumentFormat.OpenXml.Framework.3.5.1
********************************************************************************
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClosedXML" version="0.105.0" targetFramework="net48" />
<package id="ClosedXML.Parser" version="2.0.0" targetFramework="net48" />
<package id="DocumentFormat.OpenXml" version="3.5.1" targetFramework="net48" />
<package id="DocumentFormat.OpenXml.Framework" version="3.5.1" targetFramework="net48" />
<package id="ExcelNumberFormat" version="1.1.0" targetFramework="net48" />
<package id="Microsoft.Bcl.HashCode" version="6.0.0" targetFramework="net48" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="4.1.0" targetFramework="net48" />
<package id="RBush.Signed" version="4.0.0" targetFramework="net48" />
<package id="SixLabors.Fonts" version="1.0.0" targetFramework="net48" />
<package id="System.Buffers" version="4.6.1" targetFramework="net48" />
<package id="System.Memory" version="4.6.3" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.6.1" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.2" targetFramework="net48" />
</packages>
|
並沒有用到 System.ValueTuple
(完)
相關