Binding Discovery: Wrap calls to .GetCustomAttributes in try/catch #1006
Merged
gasparnagy merged 4 commits intoJan 27, 2026
Conversation
…ly handle loading errors while reflecting during binding discovery.
Handle exceptions during type attribute loading and return false to prevent further error reporting.
Added improvement to binding discovery and updated contributors.
3 tasks
gasparnagy
approved these changes
Jan 27, 2026
Contributor
gasparnagy
left a comment
There was a problem hiding this comment.
I have tested and this works fine!
Contributor
|
Released in v3.3.3 today: https://github.com/reqnroll/Reqnroll/releases/tag/v3.3.3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 What's changed?
In a small number of situations, binding discovery can fail if a test assembly uses an attribute (unrelated to Reqnroll) that can't be loaded. This can happen, for example, with the generic Connector when invoked against a .NET Framework test assembly and that assembly uses an attribute that belongs to another assembly that is loaded from the GAC. The generic connector (as a .net runtime app) can't load types from the GAC. Rather than have these situations fail the discovery completely, this PR catches those type load exceptions, logs them, and continues processing.
An example of this type of issue is logged in VS Issue #72.
⚡️ What's your motivation?
Allow the VS Extension to obtain (some) binding discovery results even in the face of unloadable types.
Partially address the errors mentioned in Discussion 977
🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist:
This text was originally taken from the template of the Cucumber project, then edited by hand. You can modify the template here.