google api - Reference version conflict in nuget package - bindingRedirect doesn't seem to work -


the nuget package google.apis.auth adds reference in project google.apis.auth.platformservices, dll version nuget 1.9.1.12399 , seems google.apis.auth needs version 1.9.1.12397 instead can see in exception thrown below.

i tried add <bindingredirect oldversion="1.9.1.12397" newversion="1.9.1.12399" /> app.config , machine.config won't work.

this exception:

    system.io.filenotfoundexception: not load file or assembly 'google.apis.platformservices, version=1.9.1.12397, culture=neutral, publickeytoken=null' or on     e of dependencies. system cannot find file specified.     file name: 'google.apis.platformservices, version=1.9.1.12397, culture=neutral, publickeytoken=null'        @ google.apis.auth.oauth2.googlewebauthorizationbroker.<authorizeasynccore>d__e.movenext()        @ system.runtime.compilerservices.asyncmethodbuildercore.start[tstatemachine](tstatemachine& statemachine)        @ system.runtime.compilerservices.asynctaskmethodbuilder`1.start[tstatemachine](tstatemachine& statemachine)        @ google.apis.auth.oauth2.googlewebauthorizationbroker.authorizeasynccore(initializer initializer, ienumerable`1 scopes, string user, cancellationtoken task     cancellationtoken, idatastore datastore)        @ google.apis.auth.oauth2.googlewebauthorizationbroker.<authorizeasync>d__1.movenext() in c:\code\google.com\google-api-dotnet-client\default\tools\google.apis.release\bin\debug\test\default\src\googleapis.auth.dotnet4\oauth2\googlewebauthorizationbroker.cs:line 59     --- end of stack trace previous location exception thrown ---        @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task)        @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task)        @ system.runtime.compilerservices.taskawaiter`1.getresult()        @ googletasker.program.<>c__displayclass4.<<main>b__0>d__6.movenext() in c:\users\user\documents\visual studio 2013\projects\googletasker\googletasker\progr     am.cs:line 29   === pre-bind state information ===     log: displayname = google.apis.platformservices, version=1.9.1.12397, culture=neutral, publickeytoken=null      (fully-specified)     log: appbase = file:///c:/users/user/documents/visual studio 2013/projects/googletasker/googletasker/bin/debug/     log: initial privatepath = null     calling assembly : google.apis.auth.platformservices, version=1.9.1.12399, culture=neutral, publickeytoken=null.     ===     log: bind starts in default load context.     log: using application configuration file: c:\users\user\documents\visual studio 2013\projects\googletasker\googletasker\bin\debug\googletasker.vshost.exe.confi     g     log: using host configuration file:     log: using machine configuration file c:\windows\microsoft.net\framework\v4.0.30319\config\machine.config.     log: policy not being applied reference @ time (private, custom, partial, or location-based assembly bind).     log: attempting download of new url file:///c:/users/user/documents/visual studio 2013/projects/googletasker/googletasker/bin/debug/google.apis.platformservices     .dll.     log: attempting download of new url file:///c:/users/user/documents/visual studio 2013/projects/googletasker/googletasker/bin/debug/google.apis.platformservices     /google.apis.platformservices.dll.     log: attempting download of new url file:///c:/users/user/documents/visual studio 2013/projects/googletasker/googletasker/bin/debug/google.apis.platformservices     .exe.     log: attempting download of new url file:///c:/users/user/documents/visual studio 2013/projects/googletasker/googletasker/bin/debug/google.apis.platformservices     /google.apis.platformservices.exe. 

and code:

static void main(string[] args)     {         usercredential credential;          using (var stream = new filestream("client_secrets.json", filemode.open, fileaccess.read))         {             task.run(async () =>                 {                     try                     {                         credential = await googlewebauthorizationbroker.authorizeasync(                             googleclientsecrets.load(stream).secrets,                             new[] { "https://www.googleapis.com/auth/tasks" },                             "user",                             cancellationtoken.none,                             new filedatastore("store")                         );                     }                     catch (exception e)                     {                         console.writeline(e.tostring());                         throw;                     }                  }             );         }     } 

app.config:

<runtime>     <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentassembly>         <assemblyidentity name="system.net.http.primitives" publickeytoken="b03f5f7f11d50a3a" culture="neutral" />         <bindingredirect oldversion="0.0.0.0-4.2.28.0" newversion="4.2.28.0" />       </dependentassembly>       <dependentassembly>         <assemblyidentity name="google.apis.auth.platformservices" publickeytoken="null" culture="neutral" />         <bindingredirect oldversion="1.9.1.12397" newversion="1.9.1.12399" />       </dependentassembly>     </assemblybinding>   </runtime> 


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

datatable - Matlab struct computations -