So let’s say for exemple I have a processes called P. P used only package from orchestrator host and tenant (to replicate the situation when our process is in production and the production machine can only access to those two orchestrator). One package called UiPath.Mail.activities use System.Text.Json in 5.0.2. However System.Memory.Data use System.Text.Json in 6.0.0. The Host orchestrator contain the 5.0.2 version but the tenant one has the 6.0.0. When I create the project the following warn is told :
NU1605: Detected package downgrade: System.Text.Json from 6.0.0 to 5.0.2. Reference the package directly from the project to select a different version.
CISAP_03_EXCLUSION_NID -> UiPath.Mail.Activities 1.22.2 -> Microsoft.Graph 4.11.0 -> Microsoft.Graph.Core 2.0.5 -> Azure.Core 1.18.0 -> System.Memory.Data 6.0.0 -> System.Text.Json (>= 6.0.0)
CISAP_03_EXCLUSION_NID -> UiPath.Mail.Activities 1.22.2 -> Microsoft.Graph 4.11.0 -> Microsoft.Graph.Core 2.0.5 -> System.Text.Json (>= 5.0.2)
My question, which version is used ? Why is it used and not the other one ? And how do I make it so it always take the most recent one.
(Side note, the NU1603 Downgrade package is also told but I do not think it’s relevant here).
system.text.json 5.0.2 is used because it’s the lower version required by a direct dependency, and nuget resolves to the lowest compatible version by default. to force the use of 6.0.0, explicitly add a dependency to system.text.json 6.0.0 in your project.
If you found helpful, mark as a solution tick.
Happy Automation
Hey @Maximilien_Selva You’re using UiPath.Mail.Activities which internally depends on System.Text.Json >= 5.0.2
System.Memory.Data, coming from a dependency chain via Azure.Core, requires System.Text.Json >= 6.0.0
Your project ends up using version 5.0.2, and you’re getting a NU1605 warning because a downgrade was detected one part of your dependency graph needs 6.0.0 but another only brings in 5.0.2, so the lower version is selected.
NuGet uses the lowest version that satisfies all dependencies, unless explicitly overridden.
In your case, System.Text.Json 5.0.2 is being used, because it’s the version resolved from the host feed, and it’s the minimum version that satisfies the lowest dependent package.
The warning NU1605 indicates this could cause runtime issues, especially if System.Memory.Data uses features from System.Text.Json 6.0.0 that don’t exist in 5.0.2.