Skip to content

Roslyn OOP does not use MEF part rejection #36396

@ryzngard

Description

@ryzngard

The OOP MEF composition currently does not have part rejection enabled. The usefulness of part rejection is that it allows dependency graphs to be used for option export. If a feature depends on something that doesn't exist, it can then also not be exported and avoid being lit up. The workaround right now is to use AllowDefault = true on imports and check for null.

This differs from the VS Mef behavior, which does use part rejection and puts the error in a logs file. We need to decide the best approach here so future service composition can be consistent. This was noticed in #36334 where one of the proposed fixes was to use part rejection to correctly disallow a feature on VS for Mac.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions