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

Fix install for .NET 4.0 #716

Closed
mmdriley opened this issue Mar 30, 2016 · 21 comments
Closed

Fix install for .NET 4.0 #716

mmdriley opened this issue Mar 30, 2016 · 21 comments
Assignees

Comments

@mmdriley
Copy link
Contributor

We removed support for .NET 4.0 in v1.11 (see #696). Our intent was that projects that still targeted .NET 4.0 would continue to see and install previous package versions that supported .NET 4.0.

Unfortunately, that's not the case. An attempt to install Google.Apis.Storage.v1 in a project targeting .NET 4.0 today results in a compatibility error:

PM> install-package google.apis.storage.v1
Attempting to gather dependencies information for package 'google.apis.storage.v1.1.11.1.434' with respect to project 'NuGetNet40', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'google.apis.storage.v1.1.11.1.434' with DependencyBehavior 'Lowest'
Resolving actions to install package 'google.apis.storage.v1.1.11.1.434'
Resolved actions to install package 'google.apis.storage.v1.1.11.1.434'
Adding package 'Microsoft.Bcl.Build.1.0.21' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.Build.1.0.21' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.Build.1.0.21' to 'packages.config'
Successfully installed 'Microsoft.Bcl.Build 1.0.21' to NuGetNet40
Adding package 'Microsoft.Bcl.1.1.10' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.1.1.10' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.1.1.10' to 'packages.config'
Successfully installed 'Microsoft.Bcl 1.1.10' to NuGetNet40
Adding package 'Microsoft.Bcl.Async.1.0.168' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.Async.1.0.168' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Bcl.Async.1.0.168' to 'packages.config'
Successfully installed 'Microsoft.Bcl.Async 1.0.168' to NuGetNet40
Adding package 'Microsoft.Net.Http.2.2.29' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Net.Http.2.2.29' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Microsoft.Net.Http.2.2.29' to 'packages.config'
Successfully installed 'Microsoft.Net.Http 2.2.29' to NuGetNet40
Adding package 'Newtonsoft.Json.7.0.1' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Newtonsoft.Json.7.0.1' to folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Added package 'Newtonsoft.Json.7.0.1' to 'packages.config'
Executing script file 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages\Newtonsoft.Json.7.0.1\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 7.0.1' to NuGetNet40
Install failed. Rolling back...
Package 'Google.Apis.Core.1.11.1 : Microsoft.Bcl [1.1.10, ), Microsoft.Bcl.Async [1.0.168, ), Microsoft.Bcl.Build [1.0.21, ), Microsoft.Net.Http [2.2.29, ), Newtonsoft.Json [7.0.1, )' does not exist in project 'NuGetNet40'
Removed package 'Newtonsoft.Json.7.0.1 : ' from 'packages.config'
Removed package 'Microsoft.Net.Http.2.2.29 : Microsoft.Bcl [1.1.10, ), Microsoft.Bcl.Build [1.0.14, )' from 'packages.config'
Removed package 'Microsoft.Bcl.Async.1.0.168 : Microsoft.Bcl [1.1.8, )' from 'packages.config'
Removed package 'Microsoft.Bcl.1.1.10 : Microsoft.Bcl.Build [1.0.14, )' from 'packages.config'
Removed package 'Microsoft.Bcl.Build.1.0.21 : ' from 'packages.config'
Package 'Google.Apis.Core.1.11.1 : Microsoft.Bcl [1.1.10, ), Microsoft.Bcl.Async [1.0.168, ), Microsoft.Bcl.Build [1.0.21, ), Microsoft.Net.Http [2.2.29, ), Newtonsoft.Json [7.0.1, )' does not exist in folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removing package 'Newtonsoft.Json.7.0.1 : ' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removed package 'Newtonsoft.Json.7.0.1 : ' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removing package 'Microsoft.Net.Http.2.2.29 : Microsoft.Bcl [1.1.10, ), Microsoft.Bcl.Build [1.0.14, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removed package 'Microsoft.Net.Http.2.2.29 : Microsoft.Bcl [1.1.10, ), Microsoft.Bcl.Build [1.0.14, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removing package 'Microsoft.Bcl.Async.1.0.168 : Microsoft.Bcl [1.1.8, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removed package 'Microsoft.Bcl.Async.1.0.168 : Microsoft.Bcl [1.1.8, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removing package 'Microsoft.Bcl.1.1.10 : Microsoft.Bcl.Build [1.0.14, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removed package 'Microsoft.Bcl.1.1.10 : Microsoft.Bcl.Build [1.0.14, )' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removing package 'Microsoft.Bcl.Build.1.0.21 : ' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
Removed package 'Microsoft.Bcl.Build.1.0.21 : ' from folder 'c:\users\matthew\documents\visual studio 2015\Projects\NuGetNet40\packages'
install-package : Could not install package 'Google.Apis.Core 1.11.1'. 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 or content files that are 
compatible with that framework. For more information, contact the package author.
At line:1 char:1
+ install-package google.apis.storage.v1
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

The best workaround at the moment is for customers to install the previous version explicitly:
Install-Package Google.Apis.Storage.v1 -Version 1.10<tab>
(Unfortunately NuGet also won't do partial matching on the version.)

This isn't acceptable and it isn't the experience we intended to provide. We're sorry for the break.

I still want to limit the maintenance burden of .NET 4.0 support, for the reasons I described in my comment in #696. The install experience has to work, but I'm okay with it leaving customers at v1.10.

With that in mind, some options I can think of:

  • Add corresponding .NET 4.0 projects for support and generated libraries.
  • Add .NET 4.0 projects only for generated (API-specific) libraries. Have the net40 versions depend on old versions of the support libraries.
  • Build a final version of our 1.10 libraries and package them as Google.Apis.DotNet40. Add "null" net40 support to the generated and support libraries so they'll still install, and add net40-specific dependencies on this other library. This is a slightly more elegant version of just checking in the built binaries.
@mmdriley
Copy link
Contributor Author

Relevant: NuGet/Home#2084

@jskeet
Copy link
Collaborator

jskeet commented Mar 31, 2016

The final option sounds like users would end up with two packages and potentially confusion. If I understand the middle option, that sounds good to me.

@LindaLawton
Copy link
Collaborator

I think there is a problem with 4.5 as well wild guess it doesn't its not installing
Microsoft.Net.Http.


PM> Install-Package Google.Apis.Analytics.v3
Attempting to resolve dependency 'Google.Apis (≥ 1.11.1)'.
Attempting to resolve dependency 'log4net (≥ 2.0.3)'.
Attempting to resolve dependency 'Google.Apis.Core (≥ 1.11.1)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 7.0.1)'.
Attempting to resolve dependency 'Zlib.Portable.Signed (≥ 1.11.0)'.
Attempting to resolve dependency 'Google.Apis.Auth (≥ 1.11.1)'.
Attempting to resolve dependency 'BouncyCastle (≥ 1.7.0)'.
Installing 'Google.Apis.Core 1.11.1'.
Successfully installed 'Google.Apis.Core 1.11.1'.
Installing 'Google.Apis 1.11.1'.
Successfully installed 'Google.Apis 1.11.1'.
Installing 'Google.Apis.Auth 1.11.1'.
Successfully installed 'Google.Apis.Auth 1.11.1'.
Installing 'Google.Apis.Analytics.v3 1.11.1.432'.
Successfully installed 'Google.Apis.Analytics.v3 1.11.1.432'.
Adding 'log4net 2.0.3' to Common.
Successfully added 'log4net 2.0.3' to Common.
Adding 'Newtonsoft.Json 7.0.1' to Common.
Installing 'Newtonsoft.Json 7.0.1'.
Successfully installed 'Newtonsoft.Json 7.0.1'.
Successfully added 'Newtonsoft.Json 7.0.1' to Common.
Adding 'Google.Apis.Core 1.11.1' to Common.
Successfully added 'Google.Apis.Core 1.11.1' to Common.
Adding 'Zlib.Portable.Signed 1.11.0' to Common.
Successfully added 'Zlib.Portable.Signed 1.11.0' to Common.
Adding 'Google.Apis 1.11.1' to Common.
Successfully added 'Google.Apis 1.11.1' to Common.
Adding 'BouncyCastle 1.7.0' to Common.
Successfully added 'BouncyCastle 1.7.0' to Common.
Adding 'Google.Apis.Auth 1.11.1' to Common.
Successfully added 'Google.Apis.Auth 1.11.1' to Common.
Adding 'Google.Apis.Analytics.v3 1.11.1.432' to Common.
Successfully added 'Google.Apis.Analytics.v3 1.11.1.432' to Common.

Gives error when you execute your application

An unhandled exception of type 'System.IO.FileLoadException' occurred in Common.dll

Additional information: Could not load file or assembly 'Google.Apis.Analytics.v3, Version=1.11.1.432, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)


PM> Install-Package Google.Apis.Analytics.v3 -Version 1.10.0.1210
Attempting to resolve dependency 'Google.Apis (≥ 1.10.0)'.
Attempting to resolve dependency 'Google.Apis.Core (≥ 1.10.0)'.
Attempting to resolve dependency 'Microsoft.Bcl (≥ 1.1.10)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.14)'.
Attempting to resolve dependency 'Microsoft.Bcl.Async (≥ 1.0.168)'.
Attempting to resolve dependency 'Microsoft.Bcl.Build (≥ 1.0.21)'.
Attempting to resolve dependency 'Microsoft.Net.Http (≥ 2.2.29)'.
Attempting to resolve dependency 'Newtonsoft.Json (≥ 7.0.1)'.
Attempting to resolve dependency 'log4net (≥ 2.0.3)'.
Attempting to resolve dependency 'Zlib.Portable.Signed (≥ 1.11.0)'.
Attempting to resolve dependency 'Google.Apis.Auth (≥ 1.10.0)'.
Attempting to resolve dependency 'BouncyCastle (≥ 1.7.0)'.
Installing 'Newtonsoft.Json 7.0.1'.
Successfully installed 'Newtonsoft.Json 7.0.1'.
Installing 'Google.Apis.Analytics.v3 1.10.0.1210'.
Successfully installed 'Google.Apis.Analytics.v3 1.10.0.1210'.
Adding 'Microsoft.Bcl 1.1.10' to Common.
Successfully added 'Microsoft.Bcl 1.1.10' to Common.
Adding 'Microsoft.Bcl.Async 1.0.168' to Common.
Successfully added 'Microsoft.Bcl.Async 1.0.168' to Common.
Adding 'Microsoft.Bcl.Build 1.0.21' to Common.
Successfully added 'Microsoft.Bcl.Build 1.0.21' to Common.
Adding 'Microsoft.Net.Http 2.2.29' to Common.
Successfully added 'Microsoft.Net.Http 2.2.29' to Common.
Adding 'Newtonsoft.Json 7.0.1' to Common.
Successfully added 'Newtonsoft.Json 7.0.1' to Common.
Adding 'Google.Apis.Core 1.10.0' to Common.
Successfully added 'Google.Apis.Core 1.10.0' to Common.
Adding 'log4net 2.0.3' to Common.
Successfully added 'log4net 2.0.3' to Common.
Adding 'Zlib.Portable.Signed 1.11.0' to Common.
Successfully added 'Zlib.Portable.Signed 1.11.0' to Common.
Adding 'Google.Apis 1.10.0' to Common.
Successfully added 'Google.Apis 1.10.0' to Common.
Adding 'BouncyCastle 1.7.0' to Common.
Successfully added 'BouncyCastle 1.7.0' to Common.
Adding 'Google.Apis.Auth 1.10.0' to Common.
Successfully added 'Google.Apis.Auth 1.10.0' to Common.
Adding 'Google.Apis.Analytics.v3 1.10.0.1210' to Common.
Successfully added 'Google.Apis.Analytics.v3 1.10.0.1210' to Common.

Your code will now work. I haven't tried to step though to see where we lost functionality


Is there any way to do a code review or test the Nuget packages before a release? If memory servis this isn't the first time we have had issues with the packages.

@jskeet
Copy link
Collaborator

jskeet commented Mar 31, 2016

Will have a look myself. I don't think Microsoft.Net.Http should be needed, but I could be wrong.

@mmdriley
Copy link
Contributor Author

I created a new project in Visual Studio 2015 targeting .NET 4.5 and ran Install-Package Google.Apis.Analytics.v3 in the Package Manager Console.

This simple program compiled and ran with no issue:

using System;

namespace NuGetNet45
{
    class Program
    {
        static void Main(string[] args)
        {
            var x = new Google.Apis.Analytics.v3.AnalyticsService();
            Console.ReadLine();
        }
    }
}

Were you trying this in the same project that had previously targeted .NET 4.0?

Are there any binding redirects present in app.config? NuGet is unfortunately not as eager as it has to be about removing redirects when they are no longer necessary.

@LindaLawton
Copy link
Collaborator

This is a new project not related to my 4.0 projects i wanted to test pagination (Was hoping it was added).

Project stats:

Visual studio: 2013
Framework: 4.5
Project type: class library

@jskeet
Copy link
Collaborator

jskeet commented Mar 31, 2016

It's working for me in a console app, VS2015, framework 4.5, using Storage (the API I'm most familiar with), listing buckets. Trying to find a laptop with VS2013 on...

@LindaLawton
Copy link
Collaborator

Let me see if i can recreate it. Something weird with this one project cant get it to do it again.

@mmdriley
Copy link
Contributor Author

I likewise can't reproduce the issue. I tried, in both VS2013 and VS2015:

  • Create a new Class Library project in a new solution
  • Install-Package Google.Apis.Analytics.v3
  • Write code in the class library that references Analytics
  • Add a console project to the solution
  • Reference and use the class library from the console project
  • Build and run

Seemed to work fine in both environments.

@mmdriley
Copy link
Contributor Author

  • Add .NET 4.0 projects only for generated (API-specific) libraries. Have the net40 versions depend on old versions of the support libraries.

One option is to expand the generated library PCLs to target net40 again. However, when we build them we'll need to reference a PCL that also targets net40, so we'd have to build against 1.10. That means app.config binding redirects for everyone because, in the common case (net45+) the version we build against won't be the one that NuGet installs.

Or we can add a new project specifically for net40 in every generated library. the PCL will remain as-is, i.e. targeting net45+. Of course, an extra project for every generated library is one of the things we were trying to avoid by dropping support for net40, but I really don't see a way out of it. 😞

@LindaLawton
Copy link
Collaborator

Uninstall-Package Google.Apis.Analytics.v3 –RemoveDependencies

seams to have fixed it. Might have been an issue with getting the packages the first time and it made a mess of things.

@LindaLawton
Copy link
Collaborator

@mmdriley
Copy link
Contributor Author

Or we can add a new project specifically for net40 in every generated library. the PCL will remain as-is, i.e. targeting net45+.

Nope, that won't work either. What about customers who are writing net40+xyz PCLs? They'll be upgraded to something that they can't compile against.

We need to have the old Profile328 target which will link against 1.10 and then a net45+xyz target that can link against 1.11. The targetFramework property of nuspec's group elements support portable-xyz monikers, so we should be able to make that work.

@mmdriley
Copy link
Contributor Author

mmdriley commented Apr 1, 2016

TODO: Why isn't this taking effect? http://blog.nuget.org/20141001/targetframeworkfiltering.html

@mmdriley
Copy link
Contributor Author

mmdriley commented Apr 1, 2016

If our packages contain two PCLs that are compatible with a given project, which will NuGet choose?

https://github.com/NuGet/NuGet.Client/blob/81717f6de319290fba103b4b5202ed5d13812397/src/NuGet.Core/NuGet.Frameworks/FrameworkReducer.cs#L409

@mmdriley
Copy link
Contributor Author

mmdriley commented Apr 4, 2016

Proposed fix: https://github.com/mmdriley/google-api-dotnet-client/tree/dotnet4-lite

Specifically: https://github.com/mmdriley/google-api-dotnet-client/commit/65dfa2ec9e6f0574f525c9cff3f6a63382397897

My work is based on #713, so I'll wait until that's merged to put this out for review.

Here's what this looks like installed in projects targeting Net40, Net45, and a few PCL profiles: mmdriley/PclTest@5d9faa6

@mmdriley
Copy link
Contributor Author

mmdriley commented Apr 4, 2016

Confirmed fixed in #718, now released as v1.12.

Projects targeting .NET 4.0 will get up-to-date generated libraries and target an older version (1.10.0) of the generated libraries:

PM> Install-Package Google.Apis.Storage.v1 -ProjectName Net40
Attempting to gather dependencies information for package 'Google.Apis.Storage.v1.1.12.0.448' with respect to project 'Net40', targeting '.NETFramework,Version=v4.0'
Attempting to resolve dependencies for package 'Google.Apis.Storage.v1.1.12.0.448' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.Apis.Storage.v1.1.12.0.448'
Resolved actions to install package 'Google.Apis.Storage.v1.1.12.0.448'
Adding package 'BouncyCastle.1.7.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'BouncyCastle.1.7.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'BouncyCastle.1.7.0' to 'packages.config'
Successfully installed 'BouncyCastle 1.7.0' to Net40
Adding package 'log4net.2.0.3' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'log4net.2.0.3' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'log4net.2.0.3' to 'packages.config'
Successfully installed 'log4net 2.0.3' to Net40
Adding package 'Microsoft.Bcl.Build.1.0.21' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.Build.1.0.21' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.Build.1.0.21' to 'packages.config'
Successfully installed 'Microsoft.Bcl.Build 1.0.21' to Net40
Adding package 'Microsoft.Bcl.1.1.10' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.1.1.10' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.1.1.10' to 'packages.config'
Successfully installed 'Microsoft.Bcl 1.1.10' to Net40
Adding package 'Microsoft.Bcl.Async.1.0.168' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.Async.1.0.168' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Bcl.Async.1.0.168' to 'packages.config'
Successfully installed 'Microsoft.Bcl.Async 1.0.168' to Net40
Adding package 'Microsoft.Net.Http.2.2.29' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Net.Http.2.2.29' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Microsoft.Net.Http.2.2.29' to 'packages.config'
Successfully installed 'Microsoft.Net.Http 2.2.29' to Net40
Adding package 'Newtonsoft.Json.7.0.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Newtonsoft.Json.7.0.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Newtonsoft.Json.7.0.1' to 'packages.config'
Executing script file 'C:\Users\mdril\Documents\GitHub\PclTest\packages\Newtonsoft.Json.7.0.1\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 7.0.1' to Net40
Adding package 'Google.Apis.Core.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Core.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Core.1.10.0' to 'packages.config'
Successfully installed 'Google.Apis.Core 1.10.0' to Net40
Adding package 'Google.Apis.Auth.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Auth.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Auth.1.10.0' to 'packages.config'
Successfully installed 'Google.Apis.Auth 1.10.0' to Net40
Adding package 'Zlib.Portable.Signed.1.11.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Zlib.Portable.Signed.1.11.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Zlib.Portable.Signed.1.11.0' to 'packages.config'
Successfully installed 'Zlib.Portable.Signed 1.11.0' to Net40
Adding package 'Google.Apis.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.1.10.0' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.1.10.0' to 'packages.config'
Successfully installed 'Google.Apis 1.10.0' to Net40
Adding package 'Google.Apis.Storage.v1.1.12.0.448' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Storage.v1.1.12.0.448' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Storage.v1.1.12.0.448' to 'packages.config'
Successfully installed 'Google.Apis.Storage.v1 1.12.0.448' to Net40

Projects targeting .NET 4.5 will get newer support libraries:

PM> Install-Package Google.Apis.Storage.v1 -ProjectName Net45
Attempting to gather dependencies information for package 'Google.Apis.Storage.v1.1.12.0.448' with respect to project 'Net45', targeting '.NETFramework,Version=v4.5'
Attempting to resolve dependencies for package 'Google.Apis.Storage.v1.1.12.0.448' with DependencyBehavior 'Lowest'
Resolving actions to install package 'Google.Apis.Storage.v1.1.12.0.448'
Resolved actions to install package 'Google.Apis.Storage.v1.1.12.0.448'
Package 'BouncyCastle.1.7.0' already exists in folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'BouncyCastle.1.7.0' to 'packages.config'
Successfully installed 'BouncyCastle 1.7.0' to Net45
Package 'log4net.2.0.3' already exists in folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'log4net.2.0.3' to 'packages.config'
Successfully installed 'log4net 2.0.3' to Net45
Package 'Newtonsoft.Json.7.0.1' already exists in folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Newtonsoft.Json.7.0.1' to 'packages.config'
Executing script file 'C:\Users\mdril\Documents\GitHub\PclTest\packages\Newtonsoft.Json.7.0.1\tools\install.ps1'
Successfully installed 'Newtonsoft.Json 7.0.1' to Net45
Adding package 'Google.Apis.Core.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Core.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Core.1.11.1' to 'packages.config'
Successfully installed 'Google.Apis.Core 1.11.1' to Net45
Adding package 'Google.Apis.Auth.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Auth.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Auth.1.11.1' to 'packages.config'
Successfully installed 'Google.Apis.Auth 1.11.1' to Net45
Package 'Zlib.Portable.Signed.1.11.0' already exists in folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Zlib.Portable.Signed.1.11.0' to 'packages.config'
Successfully installed 'Zlib.Portable.Signed 1.11.0' to Net45
Adding package 'Google.Apis.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.1.11.1' to folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.1.11.1' to 'packages.config'
Successfully installed 'Google.Apis 1.11.1' to Net45
Package 'Google.Apis.Storage.v1.1.12.0.448' already exists in folder 'C:\Users\mdril\Documents\GitHub\PclTest\packages'
Added package 'Google.Apis.Storage.v1.1.12.0.448' to 'packages.config'
Successfully installed 'Google.Apis.Storage.v1 1.12.0.448' to Net45

@mmdriley mmdriley closed this as completed Apr 4, 2016
@LindaLawton
Copy link
Collaborator

@chrisdunelm
Copy link
Contributor

Shouldn't be back again. I've just checked that a dependency on Google.Apis.Calendar.v3 is possible in a .net 4.0 project. It correctly depended on Google.Apis v1.10.0 as expected.

@LindaLawton
Copy link
Collaborator

I wonder if he is trying to add each one by itself instead of just doing

PM> Install-Package Google.Apis.Calendar.v3.

If he is actually doing

PM> Install-Package Google.Apis.Core 1.13.1

It would of course tell him that it cant do that.

@chrisdunelm
Copy link
Contributor

Yes, good point, I've added a few comments on stackoverflow

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

No branches or pull requests

4 participants