Repository navigation
Closed
Description
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
Reacted by Stuart Lang
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Application fails when using "--transitive" flag[/-][+]"dotnet-outdated" fails when using "--transitive" flag[/+]slang25 commentedon Feb 3, 2025
Thanks @milang, I need to improve the test coverage cause this one slipped through the net. I'll do a quick release for now
milang commentedon Feb 3, 2025
@slang25 thank you very much for the quick turnaround! I can confirm version 4.6.7 succeeds, no more crashes.
milang commentedon Feb 3, 2025
@slang25 any idea why
dotnet-outdated4.6.7 suggestsMicrosoft.SqlServer.Typesversion 14.x as an upgrade for version 160.x?Version 160.x supports .NET 4.8 via
net462: