-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: Better assembly resolution during dynamic loading #350
base: main
Are you sure you want to change the base?
Conversation
79a7490
to
4383f18
Compare
var assemblyName = new AssemblyName(args.Name).Name; | ||
var directoryName = Path.GetDirectoryName(args.RequestingAssembly.Location)!; | ||
|
||
logger_.LogInformation("Trying to load {Assembly} from {Directory}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be Debug
4383f18
to
dbe85d1
Compare
dbe85d1
to
27cae06
Compare
|
||
PathDictionary[Path.GetDirectoryName(Assembly.GetCallingAssembly() | ||
.Location)!] = true; | ||
PathDictionary[Path.GetDirectoryName(typeof(CollocatedAssemblyResolver).Assembly.Location)!] = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iterate over AppDomain.CurrentDomain.GetAssemblies()
instead ?
|
||
foreach (var kp in PathDictionary) | ||
{ | ||
logger_.LogInformation("Trying to load {Assembly} from {Directory}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reduce number of logs written, move this log in the if : "Assembly found in Directory" and add a log for else "Assemble not found in Directory".
No description provided.