I was wondering why nuget added the following code to my applications app.config
file, after installing the Microsoft.Bcl.Async
:
You are simply saying whenever there is older version that is between 0.0.0.0 to 2.5.19.0, please replace that version with the new version that is 2.5.19.0
Let's say you don't have the older version available in your project and you are trying to access it, then you will end up with an error like "System.IO.FileLoadException: 'Could not load file or assembly"
So when your project is looking for an older version of that DLL it will simply replace that with new one which is available
The assemblies Microsoft.Threading.Tasks
and Microsoft.Threading.Tasks.Extensions
are still referencing v1.5.11.0 of System.Runtime
and System.Threading.Tasks
.
Without the bindingRedirect
, the Microsoft.*
assemblies would try to load an old version of the System.*
assemblies, which would fail.