Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Text.Json #2

Open
JasonFDC opened this issue Nov 12, 2021 · 0 comments
Open

System.Text.Json #2

JasonFDC opened this issue Nov 12, 2021 · 0 comments

Comments

@JasonFDC
Copy link

Using version 1.1.1.1 (from Nuget) within an Azure Function:

The AddOrder method call is returning the error below.

Exception while executing function: Shipment. System.Private.CoreLib: Could not load file or assembly 'System.Text.Json, Version=5.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified

The previous version allowed Order creation, but it also had HTTP errors when adding ExtFieldCustomData to the Order.

Example code:

                var orderParams = new Order()
                {
                    Address1 = pkg.address + "," + pkg.city + "," + pkg.state + "," + pkg.zip,
                    CachedLat = pkg.latitude,
                    CachedLng = pkg.longitude,
                    AddressAlias = pkg.customer,
                    ExtFieldEmail = pkg.Customer_Email,
                    ExtFieldPhone = pkg.Customer_Phone,
                    
                    ExtFieldCustomData = new Dictionary<string, string>() 
                    { 
                       { 
                         "Barcode", pkg.Barcode.ToString() 
                       } 
                    },

                    DayScheduledFor_YYYYMMDD = DateTime.Now.ToString("yyyy-MM-dd"),
                    LocalTimeWindowEnd = null,
                    LocalTimeWindowEnd2 = null,
                    LocalTimeWindowStart = null,
                    LocalTimeWindowStart2 = null,
                    LocalTimezoneString = "America/New_York",
                    OrderIcon = "emoji/emoji-house"
                };
                
                route4Me.AddOrder(orderParams, out string errorString);

                log.LogInformation(errorString);
            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant