Skip to content

Comments

Downgrade System.Text.JSON#43

Merged
rwmcintosh merged 4 commits intomainfrom
42-downgrade-systemtextjson
Oct 23, 2025
Merged

Downgrade System.Text.JSON#43
rwmcintosh merged 4 commits intomainfrom
42-downgrade-systemtextjson

Conversation

@rwmcintosh
Copy link
Member

Fixes #42
Fixes #41

If we use the latest version of System.Text.JSON then we have to provide a MyPackage.deps.json file when using it with .NET 8.

Since we use this atypical load scenario with rSharp to support running our .NET code from R we cannot rely on a deps.json file being available during assembly load and so we have to use the version that ships with the target framework.

@rwmcintosh
Copy link
Member Author

Let's also target .NET 8 explicitly. That will require upgrading all the assemblies in MoBi (already done) and PK-Sim.

This is only going to happen on the v13 branches.

@Yuri05 Yuri05 requested a review from Copilot October 23, 2025 17:20
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses issues with System.Text.Json compatibility in atypical assembly loading scenarios by downgrading the package version and updating the target framework. The changes ensure the library works correctly with rSharp when loading .NET assemblies from R without requiring a deps.json file.

  • Downgraded System.Text.Json from version 9.0.8 to 8.0.6
  • Changed target framework from netstandard2.0 to net8
  • Added package read permissions to the build workflow

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/OSPSuite.Utility/OSPSuite.Utility.csproj Updated target framework to net8 and downgraded System.Text.Json to version 8.0.6
.github/workflows/build-pr.yml Added packages read permission to support the build workflow

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rwmcintosh rwmcintosh merged commit 3e449a8 into main Oct 23, 2025
4 checks passed
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.

Downgrade System.Text.JSON Add explicit GHA permissions to avoid code scanning warnings

2 participants