Xamarin Forms Cross Platform using Polly

Hi Guys,

I'm getting the below error when i execute my policy.

"08-10 01:57:31.434 F/ ( 6684): /Users/builder/jenkins/workspace/xamarin-android-d15-7/xamarin-android/external/mono/mono/mini/debugger-agent.c:4897: Could not execute the method because the containing type is not fully instantiated. assembly: type: member:(null) signature:"

Here is the sample code.

var responseMessage = await Policy
.Handle(ex =>
Debug.WriteLine($"{ex.GetType().Name + " : " + ex.Message}");
return true;
retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))
.ExecuteAsync(async () => await httpClient.PostAsync(uri, content));

I'm using .net standard 2.0 and Polly 6.1.
I'm just a week in to mobile development so I probably just missing something here.

Any kind of help will be much appreciated. Thanks!


Sign In or Register to comment.