Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fail to get nuget package zlib.portable

I try to follow the instructions here:

https://code.google.com/p/google-api-dotnet-client/wiki/Build

But I fail when i try to follow instructions under "Using NuGet"!

I get the following response:

Attempting to resolve dependency 'Newtonsoft.Json (≥ 5.0.5)'.
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.0.19)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.4)'.
Attempting to resolve dependency 'Microsoft.Bcl.Async (≥ 1.0.16)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.1.10)'.    
Attempting to resolve dependency 'Zlib.Portable (≥ 1.9.2)'.
Attempting to resolve dependency 'log4net (≥ 2.0.0)'.
Successfully installed 'Newtonsoft.Json 5.0.6'.
Successfully installed 'Microsoft.Bcl.Build 1.0.7'.
Successfully installed 'Microsoft.Bcl 1.0.19'.
Successfully installed 'Microsoft.Bcl.Async 1.0.16'.
Successfully installed 'Microsoft.Net.Http 2.1.10'.
Successfully installed 'Zlib.Portable 1.9.2'.
Successfully installed 'log4net 2.0.0'.
Successfully installed 'Google.Apis 1.4.0-beta'.
Successfully added 'Newtonsoft.Json 5.0.6' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Bcl.Build 1.0.7' to JoBeGAPPSAdm.
Executing script file 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Install.ps1'.
Successfully added 'Microsoft.Bcl 1.0.19' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Bcl.Async 1.0.16' to JoBeGAPPSAdm.
Successfully added 'Microsoft.Net.Http 2.1.10' to JoBeGAPPSAdm.
Executing script file 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Uninstall.ps1'.
Successfully uninstalled 'Zlib.Portable 1.9.2'.
Successfully uninstalled 'Microsoft.Net.Http 2.1.10'.
Successfully uninstalled 'Microsoft.Bcl.Async 1.0.16'.
Successfully uninstalled 'Microsoft.Bcl 1.0.19'.
Access to the path 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.Tasks.dll' is denied.
Katalogen är inte tom.

Successfully uninstalled 'Microsoft.Bcl.Build 1.0.7'.
Successfully uninstalled 'Newtonsoft.Json 5.0.6'.
Install failed. Rolling back...
Access to the path 'C:\Users\Swejope\documents\visual studi 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.Tasks.dll' is denied.
Katalogen är inte tom.

Could not install package 'Zlib.Portable 1.9.2'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references that are compatible with that framework. For more information, contact the package author.

I've tried it with .NETFramework 4.5, but same response.

Edit: I've solved this!

Updating the NuGet in Visual Studio Express 2012 sorted this out.

like image 246
JoBe Avatar asked Oct 21 '22 04:10

JoBe


1 Answers

It looks by the output you mentioned that you actually have a different problem:

Access to the path 'C:\Users\Swejope\documents\visual studio 2012\Projects\JoBeGAPPSAdm\packages\Microsoft.Bcl.Build.1.0.7\tools\Microsoft.Bcl.Build.Tasks.dll' is denied.

Check this one first, solve it (maybe run VS as admin?), and then try again.

like image 124
peleyal Avatar answered Oct 23 '22 19:10

peleyal