So, I'm using CloudFX with SDK 2.0 of Azure. Everything went well when I run my worker role outside Azure environment(neither cloud or emulator) in a console App.
When I'm trying to on Emulator or Cloud, I got an AggregateException with this info:
{"The type initializer for 'Microsoft.Experience.CloudFx.Framework.Diagnostics.TraceManager' threw an exception."}
Could not load file or assembly 'Microsoft.WindowsAzure.Diagnostics, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at Microsoft.Experience.CloudFx.Framework.Diagnostics.HybridTraceEventProvider..ctor(String providerName, Guid providerGuid)
at Microsoft.Experience.CloudFx.Framework.Diagnostics.TraceManager.<>c__DisplayClass1.<Create>b__0(Guid guid)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Experience.CloudFx.Framework.Diagnostics.TraceManager.Create(String providerName, Guid providerGuid)
at Microsoft.Experience.CloudFx.Framework.Diagnostics.TraceManager..cctor()
So I've tried to make this assembly redirect without success:
<dependentAssembly>
<assemblyIdentity name="Microsoft.WindowsAzure.Diagnostics" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>
Seems that CloudFX still bounded/references SDK 1.8. Can anyone please help us with this problem?
Thanks!