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

Version 12.0.0 has a dependency on .NET 7 in the .NET 6 build #598

Open
kirk-marple opened this issue May 31, 2023 · 5 comments · May be fixed by #607
Open

Version 12.0.0 has a dependency on .NET 7 in the .NET 6 build #598

kirk-marple opened this issue May 31, 2023 · 5 comments · May be fixed by #607
Labels
bug Issues describing a bug or pull requests fixing a bug.

Comments

@kirk-marple
Copy link
Contributor

Describe the bug

We have to stay on .NET 6 for now, because of some Azure Durable Entities issues, and I'm unable to upgrade to the latest Schema.NET because it's pulling in System.Text.Json 7.0.0, from the .NET 6.0 target.

Steps to reproduce

image

Expected behaviour

.NET 6.0 target shouldn't pull in any .NET 7 libraries

Schema objects

No response

@kirk-marple kirk-marple added the bug Issues describing a bug or pull requests fixing a bug. label May 31, 2023
@Turnerj
Copy link
Collaborator

Turnerj commented Jun 3, 2023

Hey @kirk-marple - thanks for raising the issue. Strange that you can't upgrade as System.Text.Json v7.0.0 targets .NET 6 so I don't know why it wouldn't be working for you.

Are you hitting a specific error when upgrading to Schema.NET v12 due to this?

@kirk-marple
Copy link
Contributor Author

Hi @Turnerj, downstream from this I'm using Azure Durable Entities, which isn't supported in .NET 7. I've run into dependency issues where if any 7.x.x .NET assemblies get pulled in, it causes problems finding other assemblies or has missing method exceptions. (Has happened with other packages than Schema.NET.)

So for now I've been keeping all my dependencies clear of anything 7.x.x, and avoiding any problems, until they release the next major version of Durable Entities (hopefully with .NET 8).

@Turnerj
Copy link
Collaborator

Turnerj commented Jun 8, 2023

After talking with some other .NET developers, I think I understand what is going on. Basically Azure Durable Entities is (kinda) replacing our v7 libraries with v6 ones which, through binary breaking changes, causes a whole bunch of problems.

So its less the libraries causing the problem but rather the dumb setup with Azure Durable Entities (and certain other Azure products - I think I remember Azure Functions previously having the same problem come to think of it).

Anyway, I'll get a PR up shortly for optionally having the .NET 6 references for .NET 6 and the .NET 7 references for .NET 7.

@Turnerj Turnerj linked a pull request Jun 8, 2023 that will close this issue
@kirk-marple
Copy link
Contributor Author

I just got bitten by this on another library. I have to check every package update now to see if it's bringing in System.Text.Json 7.0.x. If it happens, my Azure Functions won't load. Thankfully I learned how to use obj/project.assets.json to see where the references come from.

Appreciate you getting this resolved, and look forward to incorporating the new library.

@RehanSaeed
Copy link
Owner

I didn't know that the .NET libraries are tied to the .NET version. @Turnerj Can you share the resource you mention to learn about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues describing a bug or pull requests fixing a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants