question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command-line tool fails with "Sequence contains more than one matching element"

See original GitHub issue

I’ve just installed the command-line tool, and when I run it on a C# assembly built with Visual Studio 2019 I get the following:

defaultdocumentation.exe -a MyAssembly.dll -d MyAssembly.xml
Unhandled exception. System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.ThrowHelper.ThrowMoreThanOneMatchException()
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at CommandLine.Core.TypeLookup.FindTypeDescriptorAndSibling(String name, IEnumerable`1 specifications, StringComparer comparer)
   at CommandLine.Core.InstanceBuilder.<>c__DisplayClass0_0`1.<Build>b__9(String name)
   at CommandLine.Core.Switch.<>c__DisplayClass0_0.<Partition>b__0(Token t)
   at System.Linq.Enumerable.WhereArrayIterator`1.MoveNext()
   at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
   at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
   at CommandLine.Core.TokenPartitioner.Partition(IEnumerable`1 tokens, Func`2 typeLookup)
   at CommandLine.Core.InstanceBuilder.<>c__DisplayClass0_0`1.<Build>b__5()
   at CommandLine.Core.InstanceBuilder.Build[T](Maybe`1 factory, Func`3 tokenizer, IEnumerable`1 arguments, StringComparer nameComparer, Boolean ignoreValueCase, CultureInfo parsingCulture, Boolean autoHelp, Boolean autoVersion, IEnumerable`1 nonFatalErrors)
   at CommandLine.Parser.ParseArguments[T](IEnumerable`1 args)
   at DefaultDocumentation.Program.Main(String[] args) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Console\Program.cs:line 23

Any idea what I could be missing here? The assembly and xml file are both valid.

Max

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
IggaFcommented, Apr 27, 2021

@Doraku Hi, I’ve tested it - works 😃 Thanks a lot!

0reactions
Dorakucommented, Apr 25, 2021

There is also a preview version for the msbuild task, but I created an official version 0.7.3 with the fix anyway. Could you confirm that it fixes the problem please 😃?

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Entity Framework | Sequence contains more than one ...
I created my model with dotnet ef cli commands (dbcontext scaffold) I can use my context. But I can't touch any DbSet.. public...
Read more >
Error: Sequence contains more than one matching element
The "Sequence contains more than one matching element" error indicates that the C:\inetpub\wwwroot\BCEnterprise\Languages folder on the Web server contains ...
Read more >
"Sequence contains more than one matching element" error ...
projectKey=ourproject': Sequence contains more than one matching element 00:03:37.015 Failed to request and parse ...
Read more >
Sequence contains more than one matching element
I am trying to refresh a mixed model. Some tables from Import mode, and a dataset. When I refresh, I get this error:...
Read more >
error sequence contains more than one matching element
Failed to retrieve data for content id 5314 Sequence contains more than one matching element EXCEPTION DETAILS: System.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found