You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a scenario where I have an sln with the following hierarchy:
Project1 -> Project2 (ProjectReference)
Project1 -> Project2 (PackageReference)
(I realize this is not a standard practice, but I play around with MSBuild targets to copy different files from each of those dependencies)
When running dotnet depends on the sln, I am failing with this (Serilog being the placeholder ambiguous name):
Unhandled exception. System.Collections.Generic.KeyNotFoundException: The given key 'Serilog' was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Depends.Core.DependencyAnalyzer.<>c__DisplayClass8_1.<CreateBuilder>b__7(ProjectItem x) in /home/runner/work/depends/depends/src/Depends.Core/DependencyAnalyzer.cs:line 328
at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
at Depends.Core.Graph.DependencyGraph.Builder.WithEdges(IEnumerable`1 edges) in /home/runner/work/depends/depends/src/Depends.Core/Graph/DependencyGraph.Builder.cs:line 23
at Depends.Core.DependencyAnalyzer.CreateBuilder(IProjectAnalyzer projectAnalyzer, String projectPath, Builder builder, String framework) in /home/runner/work/depends/depends/src/Depends.Core/DependencyAnalyzer.cs:line 326
at Depends.Core.DependencyAnalyzer.AnalyzeSolution(String solution, String framework) in /home/runner/work/depends/depends/src/Depends.Core/DependencyAnalyzer.cs:line 173
at Depends.Program.GetDependencyGraph(ILoggerFactory loggerFactory) in /home/runner/work/depends/depends/src/Depends/Program.cs:line 132
at Depends.Program.OnExecute() in /home/runner/work/depends/depends/src/Depends/Program.cs:line 114
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
--- End of stack trace from previous location ---
at McMaster.Extensions.CommandLineUtils.Conventions.ExecuteMethodConvention.Invoke(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.ExecuteAsync[TApp](CommandLineContext context, CancellationToken cancellationToken)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](CommandLineContext context)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](IConsole console, String[] args)
at McMaster.Extensions.CommandLineUtils.CommandLineApplication.Execute[TApp](String[] args)
at Depends.Program.Main(String[] args) in /home/runner/work/depends/depends/src/Depends/Program.cs:line 16
Not sure if this is solvable as both dependencies will ultimately produce the same dll name (I generally don't care about that because I don't consume that dll)
I have a scenario where I have an sln with the following hierarchy:
(I realize this is not a standard practice, but I play around with MSBuild targets to copy different files from each of those dependencies)
When running
dotnet depends
on the sln, I am failing with this (Serilog being the placeholder ambiguous name):Not sure if this is solvable as both dependencies will ultimately produce the same dll name (I generally don't care about that because I don't consume that dll)
ErrorRepro2.zip
Attached is a simple repro of the problem, would appreciate any thoughts
The text was updated successfully, but these errors were encountered: