Skip to content

Fix ReflectionTypeLoadException in CodeStyleHostLanguageServices MEF composition#82442

Draft
akhera99 wants to merge 3 commits intodotnet:mainfrom
akhera99:fix_codefix_provider_loading_errors
Draft

Fix ReflectionTypeLoadException in CodeStyleHostLanguageServices MEF composition#82442
akhera99 wants to merge 3 commits intodotnet:mainfrom
akhera99:fix_codefix_provider_loading_errors

Conversation

@akhera99
Copy link
Member

@akhera99 akhera99 commented Feb 18, 2026

Fixes: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/2618500/ and #75005

MefHostExportProvider.Create was previously calling WithAssemblies which enumerates on assembly.DefinedTypes on each assembly, causing ReflectionTypeLoadExceptions to propagate up.

Changes to using WithParts and a helper that catches ReflectionTypeLoadExceptions and returns only successfully loaded types.

@akhera99
Copy link
Member Author

/pr-val

@github-actions
Copy link
Contributor

View PR Validation Run triggered by @akhera99

Parameters
  • Validation Type: pr-val
  • Pipeline ID: 8972
  • Pipeline Version: main
  • PR Number: 82442
  • Commit SHA: bd22a0fe62b7202db6eeb7cb9f68eb1fd51e937f
  • Source Branch: fix_codefix_provider_loading_errors
  • Target Branch: main
  • Build ID: 13338379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments