-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add .NET 7 and drop .NET 5 #463
Comments
Hi @Jericho, When is this expected to be released? We believe we're running into issues with our .NET 7 app using this library which is still targeting .NET 6. |
Is the issue you are facing similar to #476 by any chance? That's the only problem I am aware of that's due to net6 vs net7. My sense of urgency to change the framework targets has been low due to the fact that the only problem that I am aware of has been resolved and based on the fact than I didn't get any feedback (neither positive nor negative) on this issue. All this to say that I had not scheduled a specific date for releasing this breaking change. Having said that, I'm curious to hear more details about the problem you are facing and I'm willing to adjust my sense of urgency based on what I learn. |
I work with @vyrotek and I'll give a few more specific details. Yes, it is related to #476. We use dynamic templates and the DynamicData property is what is causing the issue. I don't know if .NET 7 targeting would solve it, or if your serializerOptions need to include the recommended action of adding the fallback as per the dotnet issue you referenced in #476 (dotnet/docs#30755). But since it looks like that type doesn't even exist in 6, .NET 7 might be needed to resolve the problem? The DynamicData property can't be added as a [JsonSerializable] attribute since you don't know the type it will be, and when we tried adding our own TypeInfoResolver property on the DynamicDataSerializationOptions you provided, it didn't seem to work, giving the same error. If you want, I can provide a sample project and open a new Issue for the DynamicData property serialization to track it. |
Thanks for letting me know the problem was related to DynamicData. It allowed me to narrow down my investigation. Here's what I learned:
The fact that a different version of the Json serializer/deserializer is used depending on the version of .net used in your app explains why we see different behaviors/problems when an app targets .net7 (this fact eluded me for a long time and I'm glad I finally figured this out. It was bothering me that I was unable to explain why the behavior was different in .net6 vs .net7). However, changing StrongGrid to target .net7 would not resolve the problem you are experiencing. It would simply ensure that System.Text.Json version7 would always be used and therefore all developers would experience the same problem you are reporting, even when using .net6. At least the problem would be consistent no matter the version of .net! All this to say that to solve the problem, I need to make two changes:
I might as well change the target frameworks to include .net7 and to drop .net5 at the same time but I want to be clear that it's neither the root of the problem nor the solution. I published a beta version with these changes to my MyGet feed. give me some fedback when you have a chance to test it. |
That beta version seems to work for our use cases. No noticeable issues in our testing. |
Thanks for confirming. I'll publish the new version to NuGet as soon as I have some free time (probably this weekend). |
🎉 This issue has been resolved in version 0.96.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
@Jericho Thank you! |
.NET 7 targeted to be Released November 2022 replaces .NET 5 as current release.
The text was updated successfully, but these errors were encountered: