Skip to content

Could not load file or assembly 'Polly, Version=5.2.0.0, Culture=neutral, PublicKeyToken=null' #501

@wildanr

Description

@wildanr

Issue Summary

Error when trying to create a new instance of SendGridClient()

 System.IO.FileLoadException: Could not load file or assembly 'Polly, Version=5.2.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
   at SendGrid.Helpers.Reliability.RetryDelegatingHandler.ConfigurePolicy()
   at SendGrid.SendGridClient.CreateHttpClientWithRetryHandler() in C:\Users\ethomas\Documents\GitHub\sendgrid-csharp\src\SendGrid\SendGridClient.cs:line 198
   at SendGrid.SendGridClient..ctor(HttpClient httpClient, SendGridClientOptions options) in C:\Users\ethomas\Documents\GitHub\sendgrid-csharp\src\SendGrid\SendGridClient.cs:line 107
   at SendGrid.SendGridClient..ctor(String apiKey, String host, Dictionary`2 requestHeaders, String version, String urlPath) in C:\Users\ethomas\Documents\GitHub\sendgrid-csharp\src\SendGrid\SendGridClient.cs:line 137

Sample code used:

   class Program
   {
      static void Main(string[] args)
      {
         var apiKey = "API_KEY_HERE";
         var client = new SendGridClient(apiKey);
      }
   }

Steps to Reproduce

  1. Create a .NET framework console application (target framework 4.6.1)
  2. Install SendGrid latest version from NuGet (9.6.0)
  3. Try sample code from https://app.sendgrid.com/guide/integrate/langs/csharp

Other Information

Already trying to install Polly from NuGet, 5.2 non-signed, 5.2 signed, 5.3 non-signed, 5.3 signed. all don't work. Clean project, rebuild, all failed.

Technical details:

  • sendgrid-csharp Version: 9.6.0
  • .NET Version: 4.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: work in progressTwilio or the community is in the process of implementingtype: bugbug in the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions