Skip to content

"dotnet-outdated" fails when using "--transitive" flag #644

Closed

Description

@milang

After upgrading to the latest version, 4.6.6, dotnet-outdated --transitive fails with an unhandled exception in our solution (running just dotnet-outdated succeeds; running version 4.6.4 dotnet-outdated --transitive also succeeds)

# dotnet-outdated --transitive
Discovering projects...
Analyzing project(s)...
Unhandled exception. System.ArgumentException: An item with the same key has already been added. Key: Microsoft.SqlServer.Types
   at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at DotNetOutdated.Core.Services.ProjectAnalysisService.AnalyzeProjectAsync(String projectPath, Boolean runRestore, Boolean includeTransitiveDependencies, Int32 transitiveDepth, String runtime) in /home/runner/work/dotnet-outdated/dotnet-outdated/src/DotNetOutdated.Core/Services/ProjectAnalysisService.cs:line 76
   at DotNetOutdated.Program.<>c__DisplayClass94_0.<<OnExecute>b__0>d.MoveNext() in /home/runner/work/dotnet-outdated/dotnet-outdated/src/DotNetOutdated/Program.cs:line 197
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__53`1.<<ForEachAsync>b__53_0>d.MoveNext()
--- End of stack trace from previous location ---
   at DotNetOutdated.Program.OnExecute(CommandLineApplication app, IConsole console) in /home/runner/work/dotnet-outdated/dotnet-outdated/src/DotNetOutdated/Program.cs:line 195
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.InvokeAsync(MethodInfo method, Object instance, Object[] arguments)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.OnExecute(ConventionContext context, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.<>c__DisplayClass0_0.<<Apply>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.ExecuteAsync(String[] args, CancellationToken cancellationToken)
   at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute(String[] args)
   at DotNetOutdated.Program.Main(String[] args) in /home/runner/work/dotnet-outdated/dotnet-outdated/src/DotNetOutdated/Program.cs:line 163

Activity

  1. changed the title [-]Application fails when using "--transitive" flag[/-] [+]"dotnet-outdated" fails when using "--transitive" flag[/+] on Feb 3, 2025
  2. slang25 commented on Feb 3, 2025

    @slang25
    Member

    Thanks @milang, I need to improve the test coverage cause this one slipped through the net. I'll do a quick release for now

  3. milang commented on Feb 3, 2025

    @milang
    Author

    @slang25 thank you very much for the quick turnaround! I can confirm version 4.6.7 succeeds, no more crashes.

  4. milang commented on Feb 3, 2025

    @milang
    Author

    @slang25 any idea why dotnet-outdated 4.6.7 suggests Microsoft.SqlServer.Types version 14.x as an upgrade for version 160.x?

    Image

    Version 160.x supports .NET 4.8 via net462:

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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