I'd like to use the Async Framework within my Viewer Add-in, however the viewer is already loading the assemblies:
[Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
[Microsoft.Threading.Tasks.Extensions, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
[Microsoft.Threading.Tasks.Extensions.Silverlight, Version=1.0.16.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
[System.Runtime, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
[System.Threading.Tasks, Version=2.5.19.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
The assemblies from the Nuget package in Microsoft.Bcl.Async -Version 1.0.168 reference a newer version of System.Runtime & System.Threading.Tasks (The version referenced in GitHub packages.config file)
[System.Runtime, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
[System.Threading.Tasks, Version=2.6.8.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]
So, by the time my add-in tries to load it's dependencies, the older version is already loaded in the appdomain by the viewer.
Is there a specific version of Microsoft.Bcl.Async which will reference the correct version of System.Runtime & System.Threading.Tasks?
Solved! Go to Solution.
Despite what GitHub shows, the 3.2 release version of the viewer visual studio template and builder/viewer do not use the Microsoft.Bcl nuget package. They use the older now defunct Async Targeting Pack.
To resolve, I unzipped the XAP and included Microsoft.CompilerServices.AsyncTargetingPack.dll into my project for Async Framework support.
All is well (until the next release).
Despite what GitHub shows, the 3.2 release version of the viewer visual studio template and builder/viewer do not use the Microsoft.Bcl nuget package. They use the older now defunct Async Targeting Pack.
To resolve, I unzipped the XAP and included Microsoft.CompilerServices.AsyncTargetingPack.dll into my project for Async Framework support.
All is well (until the next release).