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

Cleanup and remove cache attributes #14

Open
pergerch opened this issue Nov 27, 2020 · 0 comments
Open

Cleanup and remove cache attributes #14

pergerch opened this issue Nov 27, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@pergerch
Copy link
Member

Setting the Fody ShouldCleanReference property to true will only result in removing the fody references. But our Cache and NoCache attributes will then be "re-referenced" to the Microsoft.Extensions.Caching.Abstractions namespace and will throw a TypeLoadException.

The current workaround is to set the ShouldCleanReference property to false.

Set it back to true and as a cleanup step after weaving, remove our caching attributes from classes and methods, similar to the Fody.Equals add-in:

https://github.com/Fody/Equals/blob/6da330e2ba2c999124a6a68dddcfe4324a0416b4/Equals.Fody/ModuleWeaver.cs#L155-L174

@pergerch pergerch added the bug Something isn't working label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant