Description
I have an asp.net core 1.1.0-preview1
running on .net v4.6.2
and I use Google.Apis.Analytics.v3 v1.19.0.642
and Google.Apis.AnalyticsReporting.v4 v1.19.0.649
therefore my project indirectly uses Google.Apis.Auth v1.19.0
which has BouncyCastle
version >= 1.7.0 as a dependency.
The project was working fine until I installed MailKit v1.10.0
which is dependent on BouncyCastle
version >= 1.8.1 which forces the project to use BouncyCastle v1.8.1
.
According to NuGet package of Google.Apis.Auth v1.19.0
the dependency is to BouncyCastle
version >= 1.7.0 therefore v1.8.1
should be working fine.
However, since the install of MailKit v1.10.0
I keep receiving the following error...
Could not load file or assembly 'BouncyCastle.Crypto, Version=1.7.4137.9688, Culture=neutral, PublicKeyToken=a4292a325f69b123' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
...when calling GoogleCredential.FromStream(stream)
.
The strange part is that when checking the assembly file Google.Apis.Auth v1.19.0
, it doesn't show any explicit reference to BouncyCastle.Crypto v1.7.4137.9688
.
My current workaround is to explicitly reference BouncyCastle.Crypto v1.7.0
in my project and regarding that I am not using SSL protocols with MailKit
, that works fine...
...however:
- I have reference in my project that raises many warnings while running and compiling.
- as soon as I activate the SSL there will probably be problems with dependency to
BouncyCastle v1.8.1
.
Can someone take a look and find the problem please?