{"action":"created","issue":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/2624","labels_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2624/labels{/name}","comments_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2624/comments","events_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2624/events","html_url":"https://github.com/Particular/NServiceBus/issues/2624","id":53747576,"number":2624,"title":"Request: BusConfiguration.AddAssembly","user":{"login":"volak","id":1750226,"avatar_url":"https://avatars.githubusercontent.com/u/1750226?v=3","gravatar_id":"","url":"https://api.github.com/users/volak","html_url":"https://github.com/volak","followers_url":"https://api.github.com/users/volak/followers","following_url":"https://api.github.com/users/volak/following{/other_user}","gists_url":"https://api.github.com/users/volak/gists{/gist_id}","starred_url":"https://api.github.com/users/volak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volak/subscriptions","organizations_url":"https://api.github.com/users/volak/orgs","repos_url":"https://api.github.com/users/volak/repos","events_url":"https://api.github.com/users/volak/events{/privacy}","received_events_url":"https://api.github.com/users/volak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-08T12:56:34Z","updated_at":"2015-01-08T13:01:41Z","closed_at":null,"body":"I am very particular about what assemblies I let NServicebus scan because I've run into conflicts before with 3rd party assemblies.  However I just came across an issue where I want a dependency of my project to be able to add itself into the scannedTypes list WITHOUT replacing whats already been scanned.\r\n\r\nI am hesitant to implement IWantToRunWhenConfigurationIsComplete in my dependency because I don't want the users to have to remember to scan my assembly is they are using AllAssembles.Matching logic too.  Also my dependency is injecting things into the NServicebus container which won't work at that point.\r\n\r\nMy integration class is here https://github.com/volak/Aggregates.NET/blob/master/src/Aggregates.NET/Integrations/NServicebus.cs\r\n\r\nIt runs as an extension method off BusConfiguration to register internal types into NServicebus.\r\n\r\nAnd I have 2 message types inside, Accept and Reject which I need to inject into the BusConfiguration's scannedTypes list.  So I would either need a config.AddTypes or config.AddAssembly method on BusConfiguration.\r\n\r\nWhile investigating this issue it seems like this wouldn't be too hard to implement, I can even do a PR and tests if wanted.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Particular/NServiceBus/issues/comments/69176026","html_url":"https://github.com/Particular/NServiceBus/issues/2624#issuecomment-69176026","issue_url":"https://api.github.com/repos/Particular/NServiceBus/issues/2624","id":69176026,"user":{"login":"volak","id":1750226,"avatar_url":"https://avatars.githubusercontent.com/u/1750226?v=3","gravatar_id":"","url":"https://api.github.com/users/volak","html_url":"https://github.com/volak","followers_url":"https://api.github.com/users/volak/followers","following_url":"https://api.github.com/users/volak/following{/other_user}","gists_url":"https://api.github.com/users/volak/gists{/gist_id}","starred_url":"https://api.github.com/users/volak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/volak/subscriptions","organizations_url":"https://api.github.com/users/volak/orgs","repos_url":"https://api.github.com/users/volak/repos","events_url":"https://api.github.com/users/volak/events{/privacy}","received_events_url":"https://api.github.com/users/volak/received_events","type":"User","site_admin":false},"created_at":"2015-01-08T13:01:41Z","updated_at":"2015-01-08T13:01:41Z","body":"Right after submitting that I had a thought, this kind of change would introduce an order of operations issue.  For instance this would work\r\n\r\n```\r\nconfig.AssembliesToScan( AllAssemblies.Matching() );\r\nconfig.AddAssembly( typeof().Assembly )\r\n```\r\n\r\nWhereas this would not\r\n\r\n```\r\nconfig.AddAssembly( typeof().Assembly )\r\nconfig.AssembliesToScan( AllAssemblies.Matching() )\r\n```\r\n\r\nA better solution would queue up a list of assemblies to scan and wait to populate scannedTypes until after IConfigureThisEndpoint is finished"}}