Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve dependency SixLabors.Fonts #964

Closed
tvogel8570 opened this issue Nov 20, 2022 · 5 comments
Closed

Unable to resolve dependency SixLabors.Fonts #964

tvogel8570 opened this issue Nov 20, 2022 · 5 comments
Labels

Comments

@tvogel8570
Copy link

tvogel8570 commented Nov 20, 2022

Steps to reproduce
Open VS 2022
Create new C# console app for .net framework 4.7.2
Open NuGet console
PM> Install-Package npoi

Console output follows

Attempting to gather dependency information for package 'npoi.2.6.0' with respect to project 'ConsoleApp1', targeting '.NETFramework,Version=v4.7.2'
Gathering dependency information took 1.28 sec
Attempting to resolve dependencies for package 'npoi.2.6.0' with DependencyBehavior 'Lowest'
Install-Package : Unable to resolve dependency 'SixLabors.Fonts'. Source(s) used: 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
At line:1 char:1
+ Install-Package npoi
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
 
Time Elapsed: 00:00:01.8608052
@tonyqus
Copy link
Member

tonyqus commented Nov 20, 2022

Use PackageReference
Migrate from package.config to PackageReference. package.config has been deprecated for 5 year and there is a full-fledged replacement that is better in every way that works on .NET Framework. If you use PackageReference style, the NPOI will be installed without the error.

See Migrate from packages.config to PackageReference

@tonyqus
Copy link
Member

tonyqus commented Nov 20, 2022

Looks VS template for .NET framework 4.7.2 in VS2022 is still using packages.json instead of PackageReference.

@tvogel8570
Copy link
Author

Thanks for the quick, accurate response! Issue resolved.

@ivanovevgeny
Copy link

I can't use PackageReference instead of packages.config, VS2022 show an error: "Project is not eligible for migration. Either the project is not packages.config based or doesn't support PackageReference yet."
image

is there a way to update the package without replacing packages managment mechanism?

@tonyqus
Copy link
Member

tonyqus commented Sep 2, 2023

This issue is eventually resolved by the release of NPOI 2.6.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants