-
Notifications
You must be signed in to change notification settings - Fork 369
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
Problem with PubSub when referencing BouncyCastle 1.8.1 #453
Comments
@chrisdunelm You know more about the crypto side than I do. Any thoughts? It sounds like an assembly binding redirect should do the right thing here... |
Hi. I have tried an assembly binding redirect and it doesn't work, the error is still thrown. Thanks. |
@jose3m I've reproduced this in a simple test-case. I'm now investigating why this occurs, and how to fix it. |
@jose3m Hmmm, actually I'm getting a different error message, but it may be related. I've created a library that depends on BouncyCastle 1.8.1 Additional information: Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=0e99375e54769942' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Looking at the BouncyCastle.Crypto.dll file in the bin directory, it is v1.7, where I would have expected the 1.8.1 dll to be present. However, in your case it's saying it can't load v1.7, so presumably v1.8.1 is present. |
@chrisdunelm The only way to "solve" it has been to remove the reference to BouncyCastle v1.8.1 and change its use by an alternative code. I didn't want to do it this way but I am not able to find a solution. |
I've reproduced this with no Google dependencies at all. I suspect this may be because the public key token changes between BouncyCastle version 1.7.0 and 1.8.1 If this is the cause, then I'm not sure there's anything we can do :( |
I tried to force the asembly reference binding in App.config and it didn't work. I agre with you that the main problem is in the different public key token associated to the different versions of the BouncyCastle, so the only solution for me at this moment was to have all references only to one version, the used in Google packages. Thank you very much for your help. |
Hi.
I am using the Google.Pubsub.V1 1.0.0-beta02 in an app and all works perfect, but now I am integrating it in another app and suddently it fails (just launching the app).
What is the difference between both apps? The difference is that in the new app it is used another package that forces to reference the BouncyCastle package with version 1.8.1 intead of the 1.7 (used in the first app and required for the Pubsub.V1 internal references).
The thrown error is:
An exception of type 'System.InvalidOperationException' occurred in Google.Api.Gax.dll but was not handled in user code
Additional information: Error reading credential file from location C:\x\x\xx.json: No se puede cargar el archivo o ensamblado 'BouncyCastle.Crypto, Version=1.7.4137.9688, Culture=neutral, PublicKeyToken=a4292a325f69b123' ni una de sus dependencias. La definición del manifiesto del ensamblado no coincide con la referencia al ensamblado. (Excepción de HRESULT: 0x80131040)
Please check the value of the Environment Variable GOOGLE_APPLICATION_CREDENTIALS
I can't use the version 1.7 of BouncyCastle because the other package does not allow it, so I have to use the 1.8.1.
Do you know how to solve this problem? Is there any solution?
Thank you.
Jose
The text was updated successfully, but these errors were encountered: