Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Package upgrade not detected if targeting net10.0 for "in-box" dependency #685

Copy link
Copy link

Description

@martincostello
Issue body actions

Consider the following project:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="System.Text.Json" Version="6.0.0" />
  </ItemGroup>
</Project>

Running dotnet outdated gives the following output:

❯ dotnet outdated
Discovering projects...
Analyzing project(s)...
Analyzing dependencies...
» _scratch
  [net6.0]
  System.Text.Json  6.0.0 -> 10.0.0

Version color legend:
<red>   : Major version update or pre-release version. Possible breaking changes.
<yellow>: Minor version update. Backwards-compatible features added.
<green> : Patch version update. Backwards-compatible bug fixes.

You can upgrade packages to the latest version by passing the -u or -u:prompt option.
Elapsed: 00:00:02.8920607

However, after the target framework is updated to net10.0, the upgrade is no longer detected:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
-   <TargetFramework>net6.0</TargetFramework>
+   <TargetFramework>net10.0</TargetFramework>
  </PropertyGroup>
  <ItemGroup>
    <PackageReference Include="System.Text.Json" Version="6.0.0" />
  </ItemGroup>
</Project>
❯ dotnet outdated
Discovering projects...
Analyzing project(s)...
Analyzing dependencies...
No outdated dependencies were detected
Elapsed: 00:00:01.1248270

My guess is that this is related to NuGet package pruning and NU1510. While the reference is indeed redundant, it still makes sense to detect it is outdated.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.