ArxOne / MrAdvice

.NET aspect weaver (build task under NuGet package)
MIT License
311 stars 45 forks source link

AssemblyName starting with "Microsoft." skipped by Mr.Advice #166

Closed gregrata closed 4 years ago

gregrata commented 4 years ago

If the projects AssemblyName starts with "Microsoft.", and a method is decorated with a Advice attribute, the Advise method is never called. Renaming to something else (e.g., "Microsoft2." works

gregrata commented 4 years ago

Looks like it's in IsSystem():

https://github.com/ArxOne/MrAdvice/blob/5c9dd4088e92cff9bc3c41a26fbd6039e7be0ee7/MrAdvice.Weaver/Utility/ModuleDefinitionExtensions.cs#L90

"System." is probably reasonable. Not sure about Microsoft (and it's blocking me). I'm not familiar with the code base or why that's in there - would removing it be best, or add some kind of option to allow for it?

picrap commented 4 years ago

I need to take a look at it, and I will soon.

picrap commented 4 years ago

I wrote the poor man’s fix and just removed Microsoft. from exclusion.