Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

CallingAssembly.findAssembly Assumes Assembly Name Matches Namespace #22

Open
twinter-amosfivesix opened this issue Jan 14, 2021 · 0 comments

Comments

@twinter-amosfivesix
Copy link

CallingAssembly.findAssembly() uses a stack trace to find the calling assembly. Stack traces have namespaces in them. The code assumes the namespace matches the assembly name. If the calling assembly's assembly name does not match the namespace, it won't be found.

OK yeah, why would anyone do this? It was really just an intermediate step in some refactoring where I discovered this. So it will go away for me. I really just wanted to make sure I was understanding this correctly, as it sucked up a few hours. Thanks! :-)

https://github.com/JasperFx/baseline/blob/master/src/BaselineTypeDiscovery/CallingAssembly.cs#L75

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant