-
Notifications
You must be signed in to change notification settings - Fork 83
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
RT0999 rears its head again for System.Text.Json 9.0.0.0 #284
Comments
Have you upgraded to the latest 1.6.5 version? Because the older version simply do not support net9.0. |
@smkanadl Yes. In fact, the problem occurred when I upgraded to 1.6.5, because I was doing my periodic package maintenance and upgraded everything else at the same time. Note that my build target is still .NET 8, so it's not a .NET 9 issue per se. |
I just checked and I also target net8.0 using the 1.6.5 version of the package and it works fine for me. I change a few things here and there but was not able to reproduce the issue. I also forced STJ to be 9.0.0 while targeting net8.0. That work fine for me. The only way to break it was to update to net9.0 and force RT to use |
@smkanadl I can't reproduce the problem in a fresh project, but likewise I can't get it to go away in my real project. I've commented out everything I can in the .csproj file, and it still happens. Of course, if I comment out something that breaks the build, then the error doesn't occur, since it never gets to the point where it can occur. I will have to do some more experimentation to try to isolate the problem. |
@Steve-OH If it is a public repo I can have a look, otherwise you have to experiment on your own. |
@smkanadl I was able to isolate the problem: If System.Text.Json 9.0.0 is a dependency, and if the If you make code changes, the error is not always triggered on a build, but it seems to always trigger on a rebuild of the solution. |
@smkanadl By the way, while fiddling with this I discovered that other 9.0.0 packages can also trigger the error (e.g., Microsoft.Extensions.Logging.Abstractions), although I didn't investigate exactly what causes the error with those. |
@Steve-OH ah yes, that makes sense. If your net8.0 app is loaded into the net8.0 RT CLI but has a source-generator runtime dependency on net9.0, then the RT CLI would need assembly redirects which it (most likely) doesn't have. Good thing that I usually never update dependencies on versions greater than the framework version. Otherwise I would have hit the issue also. |
See #206.
.NET 8.0
Reinforced.typings is apparently incompatible with System.Text.Json 9.0.0.0. It reports the following error:
The referenced file does exist in the expected
.nuget\packages
location.Reverting to System.Text.Json 8.0 fixes the problem, but is not a long term solution, since that version does not support .NET 9.
The text was updated successfully, but these errors were encountered: