Failed to install ClosedXML dependency
Asked Answered
C

2

16

I need to install ClosedXML dependency to build a C# project with .net framework 4.7.2 but when trying to install I always get the same error: "Cannot resolve dependency 'SixLabors.Fonts'. Sources used: 'nuget.org', 'Microsoft Visual Studio Offline Packages'"

I have tried everything to install from the nuget package manager

Clearance answered 13/12, 2022 at 15:26 Comment(3)
Can you please check for package source url : api.nuget.org/v3/index.jsonCreatine
This is my URL: api.nuget.org/v3/index.jsonClearance
Yes, go to the package manager console and put the following command before installing ClosedXML: NuGet\Install-Package SixLabors.Fonts -Version 1.0.0-beta19Clearance
W
8

What version are you trying to install? I think you should install SixLabors.Fonts first and then install ClosedXML, as the newer versions of ClosedXML depend on it.

Warty answered 14/12, 2022 at 10:22 Comment(2)
I am using version 0.97.0. Can I install SixLabors.Fonts from nuget packages?Clearance
Yes, In the Manage NuGet Packages UI, check the Include prerelease and it would appear or install it from the console - nuget.org/packages/SixLabors.FontsWarty
M
30

I faced the same proplem when trying to install ClosedXML today. ClosedXML depends on the SixLabors.Fonts library which is only available in beta at the moment.

To find the library with the NuGet Browser, make sure to check the "Include prerelease" box. You should then be able to find it listed below. After installing SixLabors.Fonts, you should be able to install ClosedXml without any further issues.

enter image description here

Moneychanger answered 20/2, 2023 at 15:44 Comment(2)
"make sure to check the "Include prerelease" box" did the trick. Thanks a lot!Lactone
NPOI has this same issue and it's resolved the same wayZosima
W
8

What version are you trying to install? I think you should install SixLabors.Fonts first and then install ClosedXML, as the newer versions of ClosedXML depend on it.

Warty answered 14/12, 2022 at 10:22 Comment(2)
I am using version 0.97.0. Can I install SixLabors.Fonts from nuget packages?Clearance
Yes, In the Manage NuGet Packages UI, check the Include prerelease and it would appear or install it from the console - nuget.org/packages/SixLabors.FontsWarty

© 2022 - 2024 — McMap. All rights reserved.