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.
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 = trueon 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.