DotnetDude
DotnetDude

Reputation: 11817

Reflection and having to rebuild solution C#

I use reflection on a class to get it's custom attributes. I have noticed that when I modify the class's attributes, I need to rebuild the entire solution before reflection gives me the new values.

It appears that rebuilding the project does not do the trick. Is this because the metadata is cached?

Upvotes: 1

Views: 191

Answers (1)

Lasse V. Karlsen
Lasse V. Karlsen

Reputation: 391624

If you rebuild a single project of a solution, other projects referencing that project won't pick up the new DLLs until you build them as well.

That might be the cause of what you're seeing.

Upvotes: 4

Related Questions