简体   繁体   中英

fail to install nuget package zlib in a visual studio project

I want to test the "zlib" package on NuGet from CoApp. the version I tested in 1.2.8.1. when I tried to install the package on a test project in Visual Studio 2012, it produces the following error message:

install-package : Could not install package 'zlib.redist 1.2.8.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v3.5', 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. At line:1 char:1 + install-package zlib + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Has any one encountered the similar issue? I have tried to change my target framework to the most current one 4.5 to no avail.

It looks like these packages do not target .NET framework. They are meant to be used in C/C++ projects. You may want to use zlib.net package .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM