Title: "Sequence contains no matching element" when building the Architecture · Issue #280 · TNG/ArchUnitNET · GitHub
Open Graph Title: "Sequence contains no matching element" when building the Architecture · Issue #280 · TNG/ArchUnitNET
X Title: "Sequence contains no matching element" when building the Architecture · Issue #280 · TNG/ArchUnitNET
Description: Problem Description In AddMethodDependencies.HandleIterator(), the first found instruction with new object op code is an ArgumentNullException. The TypeDefinition of the declaring type does not have a method named "MoveNext", which cause...
Open Graph Description: Problem Description In AddMethodDependencies.HandleIterator(), the first found instruction with new object op code is an ArgumentNullException. The TypeDefinition of the declaring type does not hav...
X Description: Problem Description In AddMethodDependencies.HandleIterator(), the first found instruction with new object op code is an ArgumentNullException. The TypeDefinition of the declaring type does not hav...
Opengraph URL: https://github.com/TNG/ArchUnitNET/issues/280
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Sequence contains no matching element\" when building the Architecture","articleBody":"**Problem Description**\r\nIn `AddMethodDependencies.HandleIterator()`, the first found instruction with new object op code is an `ArgumentNullException`. The `TypeDefinition` of the declaring type does not have a method named \"MoveNext\", which causes an `InvalidOperationException` since `First()` does not find a matching method definition.\r\n\r\n**Possible Cause**\r\nUsage of `JetBrains.Annotations.NotNullAttribute` in the method associated with the method body.\r\n\r\n**Possible Fix (?)**\r\nFind the first instruction with new object op code which at the same time is not an exception.\r\n\r\n**Stack Trace**\r\n```\r\nSystem.InvalidOperationException: Sequence contains no matching element\r\n at System.Linq.ThrowHelper.ThrowNoMatchException()\r\n at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)\r\n at ArchUnitNET.Loader.LoadTasks.AddMethodDependencies.HandleIterator(MethodDefinition\u0026 methodDefinition, MethodBody\u0026 methodBody, List`1 bodyTypes, ICollection`1 visitedMethodReferences)\r\n at ArchUnitNET.Loader.LoadTasks.AddMethodDependencies.CreateMethodBodyDependencies(MethodDefinition methodDefinition, MethodMember methodMember)+MoveNext()\r\n at System.Linq.Enumerable.ConcatIterator`1.MoveNext()\r\n at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)\r\n at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)\r\n at ArchUnitNET.Loader.LoadTasks.AddMethodDependencies.\u003c\u003ec.\u003cExecute\u003eb__4_3(ValueTuple`2 tuple)\r\n at ArchUnitNET.Domain.Extensions.EnumerableExtensions.ForEach[T](IEnumerable`1 source, Action`1[] actions)\r\n at ArchUnitNET.Loader.LoadTasks.AddMethodDependencies.Execute()\r\n at ArchUnitNET.Loader.LoadTaskRegistry.\u003cExecuteTasks\u003eb__1_1(Type taskKey)\r\n at ArchUnitNET.Domain.Extensions.EnumerableExtensions.ForEach[T](IEnumerable`1 source, Action`1[] actions)\r\n at ArchUnitNET.Loader.LoadTaskRegistry.ExecuteTasks(List`1 taskOrder)\r\n at ArchUnitNET.Loader.ArchBuilder.UpdateTypeDefinitions()\r\n at ArchUnitNET.Loader.ArchBuilder.Build()\r\n at ArchUnitNET.Loader.ArchLoader.Build()\r\n\r\n```","author":{"url":"https://github.com/Optano-Dev","@type":"Person","name":"Optano-Dev"},"datePublished":"2024-08-02T06:38:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/280/ArchUnitNET/issues/280"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:66a1355d-d1dc-e021-17f8-4cdc98f21724 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B458:1A0CEA:80A5CA:ADF2C5:6A4C839D |
| html-safe-nonce | 8b7de73b6dec3f2b3082f6a28ea502c0cd89ca278b84e8929404e1b93d3e829a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDU4OjFBMENFQTo4MEE1Q0E6QURGMkM1OjZBNEM4MzlEIiwidmlzaXRvcl9pZCI6IjU5MjM1NTkyNDc5MjA3OTI0NzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 217ecda9d1bc32271de90012faea915e20460a94b734f9b0d0ba707d18fed17a |
| hovercard-subject-tag | issue:2444186551 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/TNG/ArchUnitNET/280/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1c6cc51303fcf4f74de15d33693bd71b5586be334cd55bc36da8e8dea0f07d35/TNG/ArchUnitNET/issues/280 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1c6cc51303fcf4f74de15d33693bd71b5586be334cd55bc36da8e8dea0f07d35/TNG/ArchUnitNET/issues/280 |
| og:image:alt | Problem Description In AddMethodDependencies.HandleIterator(), the first found instruction with new object op code is an ArgumentNullException. The TypeDefinition of the declaring type does not hav... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Optano-Dev |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| go-import | github.com/TNG/ArchUnitNET git https://github.com/TNG/ArchUnitNET.git |
| octolytics-dimension-user_id | 432256 |
| octolytics-dimension-user_login | TNG |
| octolytics-dimension-repository_id | 198763782 |
| octolytics-dimension-repository_nwo | TNG/ArchUnitNET |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 198763782 |
| octolytics-dimension-repository_network_root_nwo | TNG/ArchUnitNET |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width