Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Could not load type 'Flurl.Http.HttpExtensions' from assembly 'Flurl.Http, Version=2.3.2.0, #25

Open
Maxhodges opened this issue Aug 16, 2018 · 2 comments

Comments

@Maxhodges
Copy link

Maxhodges commented Aug 16, 2018

HI anyone else seen this? I'm quite stuck :(

Trying to init the provider. Error happens on this line, toward the bottom

var token = await provider.GenerateAccessTokenAsync(refreshToken);

context:

  // Create a cloud job ticket first, it contains the printer setting of the document
  var cjt = new CloudJobTicket {
   Print = new PrintTicketSection {
    Color = new ColorTicketItem {
      Type = GoogleCloudPrintApi.Models.Printer.Color.Type.STANDARD_MONOCHROME
     },
     Duplex = new DuplexTicketItem {
      Type = Duplex.Type.LONG_EDGE
     },
     PageOrientation = new PageOrientationTicketItem {
      Type = PageOrientation.Type.LANDSCAPE
     },
     Copies = new CopiesTicketItem {
      Copies = 3
     }
   }
  };

  // Create a request for file submission, you can either submit a url with SubmitFileLink class, or a local file with SubmitFileStream class
  var request = new SubmitRequest {
   PrinterId = Properties.Settings.Default.CPPrinterId,
    Title = orderId,
    Ticket = cjt,
    //Content = new SubmitFileLink(url) // or new SubmitFileStream(contentType, fileName, fileStream)
    Content = new SubmitFileStream("application/pdf", orderId, outputMemstream)

  };

  var clientId = Properties.Settings.Default.CPClientId;
  var clientSecret = Properties.Settings.Default.CPClientSecret;
  var refreshToken = Properties.Settings.Default.CPRefreshToken;

  var provider = new GoogleCloudPrintOAuth2Provider(clientId, clientSecret);

  /* Your method to retrieve authorization code from the above url */
  var token = await provider.GenerateAccessTokenAsync(refreshToken);

  var CPClient = new GoogleCloudPrintClient(provider, token);

  // Submit request
  var response = CPClient.SubmitJobAsync(request);
@Maxhodges
Copy link
Author

maybe I need to install an older version? you know what version might work?

@Maxhodges Maxhodges reopened this Aug 16, 2018
@awerber
Copy link

awerber commented Aug 16, 2018

I have version 1.2.0 of Flurl.Http and version 2.4.0 of Flurl in my project that uses this code. I did a download of this project last October.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants