liuqiaosz / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Translate NuGet package throws MissingMethodException #468

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.New Class Library project
2.Add Google.APIs.Translate.V2 package(and dependencies)
3.Create simple class with single method based on Translate TranslateText sample
4.Create unit test of that method
5.Run unit test

What is the expected output? 
Console output as per the example at 
https://code.google.com/p/google-api-dotnet-client/source/browse/Translate.Trans
lateText/Program.cs?repo=samples

What do you see instead?
Exception thrown when attempting to create the TranslateService instance.
Detail:
System.MissingMethodException was unhandled by user code
  HResult=-2146233069
  Message=Method not found: 'Void System.Net.Http.HttpClientHandler.set_AutomaticDecompression(System.Net.DecompressionMethods)'.
  Source=Google.Apis.Core
  StackTrace:
       at Google.Apis.Http.HttpClientFactory.CreateHandler(CreateHttpClientArgs args)
       at Google.Apis.Http.HttpClientFactory.CreateHttpClient(CreateHttpClientArgs args) in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis.Core\Apis\Http\HttpClientFactory.cs:line 36
       at Google.Apis.Services.BaseClientService.CreateHttpClient(Initializer initializer) in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis\Apis\Services\BaseClientService.cs:line 168
       at Google.Apis.Services.BaseClientService..ctor(Initializer initializer) in c:\code\google.com\google-api-dotnet-client\default\Tools\Google.Apis.Release\bin\Debug\output\default\Src\GoogleApis\Apis\Services\BaseClientService.cs:line 136
       at Google.Apis.Translate.v2.TranslateService..ctor(Initializer initializer) in c:\code\google.com\google-api-dotnet-client\default_182\Tools\Google.Apis.NuGet.Publisher\Template\Build\Google.Apis.Translate.v2.cs:line 155
       at (remainder omitted)
InnerException: 

What version of the product are you using?
Google.APIs.Translate.v2.dll 1.8.1.33
What is your operating system?
Windows 8.1
What is your IDE?
Visual Studio 2013 Update 2
What is the .NET framework version?
4.5

Please provide any additional information below.

Original issue reported on code.google.com by sean.gif...@itracks.com on 14 Jun 2014 at 3:55

GoogleCodeExporter commented 9 years ago
have you found what is causing this error?

Original comment by artur.bo...@trbls.com on 31 Oct 2014 at 11:21

GoogleCodeExporter commented 9 years ago
I'm getting this error also on localhost

Original comment by marketin...@gtempaccount.com on 3 Nov 2014 at 8:28