Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Type comparisons fail because the dynamic assembly type doesn't match the usual assembly type. #1123

Unanswered
DanielVernall asked this question in Q&A
Discussion options

Hi there,

We're using Asp.Versioning with OData on Asp.Net Core and we're struggling with type mismatch which I believe is caused by Asp.Versioning loading a new assembly for each api version (as described in the comments on DefaultModelTypeBuilder)

This StackOverflow question has more information about the problem (before we realised it was related to Asp.Versioning).

We're trying to ignore certain properties in the Swagger API but we can't compare our types against interfaces nor use them as dictionary keys to get cached information.

Here's some output from the immediate window showing the type mismatch.

?GetType(S4D_Data.Patient).AssemblyQualifiedName
"S4D_Data.Patient, S4D Data, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
?p.PropertyType.AssemblyQualifiedName
"S4D_Data.Patient, V2e56f2547b0f45d2a33a0d70b908a55e.DynamicModels, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null"
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /