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

[V3] Override abstract fields in HttpClientRequestMessage #52

Merged

Conversation

fannydengdeng
Copy link

Services targeting .net framework are getting the following error when trying to use Extensions for V3 clients.

System.TypeLoadException: Method 'get_Timeout' in type 'Microsoft.OData.Extensions.V3Client.HttpClientRequestMessage' from assembly 'Microsoft.OData.Extensions.V3Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.

This is because the net40 target of ODataLib V3 exposes additional abstract fields in DataServiceClientRequestMessage. See https://github.com/OData/odata.net/blob/maintenance-5.x/WCFDataService/Client/System/Data/Services/Client/Serialization/DataServiceClientRequestMessage.cs

The fix is similar to #43 .

@fannydengdeng fannydengdeng changed the title Override abstract fields in HttpClientRequestMessage [V3] Override abstract fields in HttpClientRequestMessage Sep 20, 2021
}
#endif

#if !ASTORIA_LIGHT && !PORTABLELIB
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't put them into one #if

@xuzhg xuzhg merged commit 1697f89 into OData:maintenance-v3 Oct 4, 2021
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

Successfully merging this pull request may close these issues.

2 participants