Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make directory scanning configurable #6265

Merged
merged 4 commits into from
Feb 17, 2022

Conversation

timbussmann
Copy link
Contributor

@timbussmann timbussmann commented Feb 15, 2022

backport of #6239 to release 7.7

Allows to configure the AssemblyScanner to not scan assemblies in the bin folder (and other valid probing paths). When disabled, NServiceBus will only scan types loaded into the assembly load context/AppDomain.
This can be used to prevent scanning of assemblies that are not already loaded when NServiceBus starts (note that this also excludes assemblies that might be referenced at compile time but are then not loaded because they are not explicitly referenced in code).

Note, even when disabling directory scanning at startup, assemblies can still be loaded at runtime due to dynamic type loading. Dynamic type loading can be disabled by #6280

Documentation: https://docs.particular.net/nservicebus/hosting/assembly-scanning

# Conflicts:
#	src/NServiceBus.Core.Tests/AssemblyScanner/AssemblyScannerTests.cs
@timbussmann timbussmann added this to the 7.7.0 milestone Feb 15, 2022
@timbussmann timbussmann merged commit 7476f1f into release-7.7 Feb 17, 2022
@timbussmann timbussmann deleted the disable-assembly-scanning-backport branch February 17, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants