googleapis / google-api-dotnet-client

Google APIs Client Library for .NET
https://developers.google.com/api-client-library/dotnet
Apache License 2.0
1.36k stars 525 forks source link

Google.Apis.Oauth2.v2 NuGet Error #934

Closed rowlesy1987 closed 7 years ago

rowlesy1987 commented 7 years ago

Hi

I'm trying to install Google.Apis.Oauth2.v2 via NuGet in SQL Server Data Tools for Visual Studio 2013, but I get the below error:

Attempting to resolve dependency 'Google.Apis (= 1.10.0)'. install-package : Updating 'Google.Apis 1.22.0' to 'Google.Apis 1.10.0' failed. Unable to find versions of 'Google.Apis.Oauth2.v2, Google.Apis.Auth' that are compatible with 'Google.Apis 1.10.0'. At line:1 char:1

jskeet commented 7 years ago

Could you explain what you mean by "in SQL Server Data Tools"? It's not clear to me why SQL Server Data Tools would be wanting to use Google.Apis. What kind of project is this for?

The more context you can give, the more likely it is that we'll be able to help.

rowlesy1987 commented 7 years ago

Hi

I am trying to write an SSIS package that downloads data from a Google Sheet, I am trying to utilise the Script Component as per http://stackoverflow.com/questions/30469058/google-gdata-client-gdatarequestexception-authentication-suddenly-fails-in-old. This requires Google.Apis.Oauth2.v2, and when I try and install the package from https://www.nuget.org/packages/Google.Apis.Oauth2.v2/ I get teh error in the first post.

jskeet commented 7 years ago

Okay, thanks for the extra information. I don't know anything about SSIS packages, including which version of .NET they target, but you might want to try making sure everything is using the 1.10.0 packages. (I don't know at what point you were getting that error, or what you'd already installed before then.)

LindaLawton commented 7 years ago
  1. The client libraries only work with .Net 4.5 you need to figuer out what version MSSql server2013
  2. The dlls need to be in GAC
  3. They also need to be here Program Files (x86)\Microsoft SQL Server\120\DTS\PipelineComponents Program Files\Microsoft SQL Server\120\DTS\PipelineComponents Program Files\Microsoft SQL Server\120\DTS\Connections Program Files (x86)\Microsoft SQL Server\120\DTS\Connections

Assuming that i am remember correctly i think 2013 is 120 cant remember of the top of my head. All that being said i gave up three years ago trying to get this library to work with scripting tasks and wrote my own custom connection manger and data-source reader for Google Analytics :)

Look what i found:

Currently, there is no express edition of SQL Server that can be used with .Net Framework 4.5 and 4.6,you still need to go back to .NET Framework 4.0. However, begin with SQL Server 2016, you can take advantage of the latest .NET Framework 4.x libraries and code, for more details, please review this similar blog.

You are correct though that the old Gdata library will probably work as it was an older version of .net your going to have to copy it into the directories in question. Your going to have to download the source and sign it as you cant put it in GAC unless its strong name signed. Getting it to work with Oauth i wish you luck there is no documentation on that I got it to work once i think.

chrisdunelm commented 7 years ago

Although projects targeting .NET4.0 should work, it's deprecated and unsupported. As previously mentioned, Google.Apis v1.10.0 was the last version of the package to support .NET4.0 so v1.10.0 of Google.Apis is correct. Did you start the project targetting a version of .NET greater than 4.0? Then re-target to .NET4.0? That would explain how Google.Apis v1.22.0 was installed. possibly starting with a fresh project targeting .NET4.0 may help.

I have no knowledge of SSIS or scripting environments, so can't help with any issues related to that.

LindaLawton commented 7 years ago

I tried to get it to work the other day. I don't think that the SSIS Framework is going to support this library the framework is to different. The way it sends HTTP requests alone is not the same so even the old NuGet packages wont work.

chrisdunelm commented 7 years ago

Closing for now, as SSIS/.NET4.0 are environments we don't support.