-
Notifications
You must be signed in to change notification settings - Fork 41
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 install Cube.Native.Pdfium.Lite.117.0.593 in .NET Framework projects #37
Comments
Cube.Native.Pdfium.Lite is a package for pdfium.dll (an unmanaged DLL), so it is independent of .NET Framework version. This error is often resolved by updating the version of NuGet itself, so please check. |
Hi, I think I have already the latest version of NuGet (Package Manager Console Host Version 6.7.0.127). I only get this error for projects targeted for .Net Framework 4.8. If I create a new project that targets .Net 6.0, I get no errors when installing. Thanks! |
Is there any metadata error in Nuget repository? |
Thanks for your information. I will investigate the issue. |
I tried several things but could not reproduce it here. |
Thank you. I am not too sure how to put the lib/net48 folder in the Nuget package. I still can't install cube.native.pdfium.lite via NuGet Package Manager in Visual Studio 2022, when I create a new project that targets .NET framework 4.8. What I have done was to create a dummy .NET 6.0 project, install the package and copied back the contents to the .NET 4.8 framework. |
I found the cause. This error seems to occur when using the old CSPROJ format. We will fix the issue in the next release (cube.native.pdfium.lite 120.0), but to avoid the error, please try either of the following 1. Use the new CSPROJ format (recommended)For example, after creating a .NET 6.0 target project using Visual Studio, open the *.csproj file in a text editor and rewrite the TargetFramework from net6.0-windows to net48. (you may want to add 2. Add lib/net48 to the extracted NuGet package folderBy default, NuGet packages are deployed in the Note that if you continue to use the old CSPROJ format in this way, the build will complete successfully, but the unmanaged DLL (pdfium.dll) will not be copied automatically. Therefore, you will need to manually copy the dll from the runtimes/win-x64 or runtimes/win-x86 folder after the build. |
Hello,
When I tried to install via nuget, I got an error that it cannot be installed in .NET framework 4.8 project. Could it be fixed? Thanks!
Install-Package : Could not install package 'Cube.Native.Pdfium.Lite 117.0.5938'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.8', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
The text was updated successfully, but these errors were encountered: