Open tmasternak opened 3 years ago
where assemblies are known and available at compile time (probably the majority of cases)
would that be something the user has to explicitly define? I'm not sure how else we can be sure that there will be no assembly to scan?
@timbussmann did not dig deep into possible solutions but I see at least 3 options here:
It's important to remember that ADSD teaches that the project view in Visual Studio (or wherever compilation and thus source generators are acting) isn't necessarily the same as your deployment view, and that service composition can be done by deploying DLLs together.
NServiceBus endpoint is doing assembly scanning during startup. In scenarios, where assemblies are known and available at compile time (probably the majority of cases) we could use source generators to run the scanning once and provide the results as additional type generated pre-compile-time.
There is probably some impact on the development experience i.e. how long it takes to do the scanning so that this does not impede the F5 experience.
This feature would enable us to have a quicker cold-start experience in Cloud environments like container hosting, Azure Functions, and AWS Lambda.