$ dotnet run
Thing1 did it
$ dotnet run -p:AddExtra=true
Extra initialized
Thing1 did it
Thing 2 did itAlso works with publish -p:PublishAot=true
Add a [ModuleInitializer] method to the main assembly that calls a predetermined method in the extra assembly which augments some stuff in a singleton.