azure-sdk-for-net
azure-sdk-for-net copied to clipboard
[QUERY] TypeLoadException while using blobclientOptions.AddPolicy on Xamarin.iOS
Library name and version
Azure.Storage.Blobs 12.12.0
Query/Question
Hi,
I am trying to use the Azure Blob Storage SDK to list the contents of a directory on Xamarin.iOS.
The following code fails.
var blobClientOptions = new BlobClientOptions(BlobClientOptions.ServiceVersion.V2021_06_08);
try
{
HttpPipelinePolicy policy = new AuthTokenHttpPipelinePolicy(restApiClient);
blobClientOptions.AddPolicy(policy, HttpPipelinePosition.PerRetry);
blobClientOptions.AddPolicy(new ApimTracingHttpPipelinePolicy(restApiClient), HttpPipelinePosition.PerRetry);
blobClientOptions.AddPolicy(new SasTokenHttpPipelinePolicy(sasCache), HttpPipelinePosition.PerRetry);
} catch(Exception e)
{
Console.WriteLine(" Caught in exception, " + e.ToString());
}
But the line blobClientOptions.AddPolicy(policy, HttpPipelinePosition.PerRetry) fails on Xamarin.iOS. Its working fine on Xamarin.Android.
This is the exception that I am getting.
Environment
Xamarin.iOS
Thank you for your feedback. This has been routed to the support team for assistance.
BlobClientOptions inherits the AddPolicy
method from ClientOptions
from the Azure.Core package.
Adding tag for Core
Also could you define what's occurring in your custom class for AuthTokenHttpPipelinePolicy
, that doesn't seem like that belongs to Azure.Core or any of our other SDKs
FYI @jsquire
Hi @bonniemathew. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.
@bonniemathew: I'm unable to reproduce this with the latest VS for Mac, XCode, and Blob Storage package. As @amnguye mentioned, it would be very helpful to understand the code in your AuthTokenHttpPipelinePolicy
implementation.
Hi @bonniemathew, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!