abujehad139 / 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

Errors in the build process #341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When running the BuildProcess.exe it looks like Unit tests are failing, 
although they run successfully in VS.

The error we see is the following:
....
'Google.Apis.Tests.Apis.Http.ConfigurableMessageHandlerTest.SendAsync_BackOffExc
eptionHandler_DontThrow'
   Google.Build.Tester:   Testing 'Google.Apis.Tests.Apis.Http.ConfigurableMessageHandlerTest.SendAsync_BackOffExceptionHandler_Throw_Max1Hour'
   Google.Build.Tester:     [CreateRequest_DeveloperKey]: FAILED!
   Google.Build.Tester:       System.IO.FileLoadException : Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependenc
s. The located assembly's manifest definition does not match the assembly 
reference. (Exception from HRESULT: 0x80131040)
   Google.Build.Tester:     [CreateRequest_DeveloperKey_RequiresEscape]: FAILED!
   Google.Build.Tester:       System.IO.FileLoadException : Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependenc
s. The located assembly's manifest definition does not match the assembly 
reference. (Exception from HRESULT: 0x80131040)
....

Original issue reported on code.google.com by pele...@google.com on 24 Jun 2013 at 8:35

GoogleCodeExporter commented 9 years ago
Is this issue resolved. I am too getting this error, when I am trying to build 
CalendarService. Following is my code
static CalendarService BuildCalendarService()
        {
            X509Certificate2 certificate = new X509Certificate2(SERVICE_ACCOUNT_PKCS12_FILE_PATH, "notasecret",
                X509KeyStorageFlags.Exportable);

            var provider = new AssertionFlowClient(GoogleAuthenticationServer.Description, certificate)
            {
                ServiceAccountId = SERVICE_ACCOUNT_EMAIL,
                Scope = CalendarService.Scopes.Calendar.GetStringValue(),
            };
            var auth = new OAuth2Authenticator<AssertionFlowClient>(provider, AssertionFlowClient.GetState);

            return new CalendarService((new BaseClientService.Initializer()
                            {
                                Authenticator = auth,
                                ApplicationName = "Drive API Sample",
                            }));
        }

Original comment by Rohan.S....@gmail.com on 28 Jul 2013 at 10:30

GoogleCodeExporter commented 9 years ago
I have the same problem :/ 

Original comment by haaland@gmail.com on 3 Aug 2013 at 10:20

GoogleCodeExporter commented 9 years ago
I got the same error in my code:
_service = new AnalyticsService(new BaseClientService.Initializer()
                {
                    Authenticator = _authenticator
                });

Original comment by scanshow...@gmail.com on 6 Aug 2013 at 3:58

GoogleCodeExporter commented 9 years ago
Did you install the Goolge.Apis NuGet package?

Original comment by pele...@google.com on 10 Aug 2013 at 3:18

GoogleCodeExporter commented 9 years ago

Original comment by pele...@google.com on 14 Aug 2013 at 3:25

GoogleCodeExporter commented 9 years ago
Old issue, but we should add unit tests runs to our new 
Google.Apis.BuildRelease process (and not run it manually before the release)

Original comment by pele...@google.com on 28 Nov 2013 at 6:01

GoogleCodeExporter commented 9 years ago
Old issue, perhaps, but I still have this ... and I initialized using NuGet to 
get dependencies. What was the resolution please?

Original comment by tom.win...@pressman.co on 4 Dec 2013 at 12:34

GoogleCodeExporter commented 9 years ago

Has this error be finally fixed. 
**************************************
Could not load file or assembly 'System.Net.Http.Primitives, Version=1.5.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 
The located assembly's manifest definition does not match the assembly 
reference. (Exception from HRESULT: 0x80131040)
*************************************

the error is thrown when this api client's is install to an existing project 
even with nugget.

Original comment by adm...@student.oaucdl.edu.ng on 13 Nov 2014 at 11:36

GoogleCodeExporter commented 9 years ago
Is this already resolved? what is the resolution? I am using 2.2.22.0

Original comment by secur...@gmail.com on 31 Dec 2014 at 6:01

GoogleCodeExporter commented 9 years ago
i have the same error with Version 2.2.28 ,what was the solution please?

Original comment by fatimabe...@gmail.com on 19 Jan 2015 at 10:01

GoogleCodeExporter commented 9 years ago
i resolve the problem , i add in 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config 

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.6.9.0" newVersion="2.6.9.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="2.2.28.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="2.2.28.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
      </dependentAssembly>
    </assemblyBinding>     
  </runtime>

Original comment by fatimabe...@gmail.com on 20 Jan 2015 at 5:11

GoogleCodeExporter commented 9 years ago
I too solved the problem by adding the following  in 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config 

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.0.12.0" newVersion="1.0.12.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="4.2.29.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Original comment by sarbjitc...@gmail.com on 14 Mar 2015 at 11:23

GoogleCodeExporter commented 9 years ago
error was {"Could not load file or assembly 'System.Net.Http.Primitives, 
Version=1.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of 
its dependencies. The located assembly's manifest definition does not match the 
assembly reference. (Exception from HRESULT: 
0x80131040)":"System.Net.Http.Primitives, Version=1.5.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a"}

Original comment by sarbjitc...@gmail.com on 14 Mar 2015 at 11:24

GoogleCodeExporter commented 9 years ago
I too solved the problem by adding in 
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config 

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.0.12.0" newVersion="1.0.12.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="4.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.28.0" newVersion="4.2.29.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>

Original comment by sarbjitc...@gmail.com on 14 Mar 2015 at 11:25