Closed mthalman closed 5 months ago
In addition to fixing this, there should be a test added which executes this code path. This will allow us to discover any MEF import/export issues via the tests instead of later when executing the validation pipeline.
The same outcome could also be accomplished by switching to a compile-time dependency injection library, e.g. Jab, StrongInject, or Pure.DI. That would cause a build error instead of a runtime error.
The changes from https://github.com/dotnet/docker-tools/pull/1272 caused an issue with the satisfying the MEF imports for
BuildCommand
. These show up in the output (see below) but do not cause an exception when loading Image Builder. This makes it more difficult to diagnose the issue. You don't know anything is wrong until an attempt to use the affected command occurs. And for some commands, that might not even happen in the validation pipeline. We should update Image Builder such that these import failures cause an exception that causes Image Builder to fail immediately.