Okay so I have an app that I have been tasked with editing that source is not available and due to confidentiality I cannot share the app/code - I realize that makes these kind of questions challenging but since I have done this before I believe it to be something simple I am overlooking.
I have performed this in the past and the only difference is that this is a new build using 4.5 and latest C# compiler etc.
Here's the scenario:
I can open the app, and read it properly and edit the IL. In fact, I can edit it without issue using reflexil both in Reflection desktop (latest), Telerik (my usual go-to) also using updated reflexil, then I also tried dnSpy latest nightly 3.0.1.
Heck, thinking I was losing my mind I even opened it using older GreyDragon, also edited some IL, saved the exe assembly, and even IL directly in the entry point main still does not execute as changed but as the prior unchanged original, yet in ALL those tools, if I re-open the previously edited and saved assembly exe, it DOES in all cases properly show the changes, both in decompiled C# as well as in the corresponding IL instructions.
The only thing that I can pinpoint could differ again is newer targeted dotnet version and it being compiled in a newer C# compiler/ver.
So, is there any reason that the latest version of C# Rosylyn etc. would prevent IL editing methods (and virtually every tool that can do IL editing) that previously worked from working now, almost as if a secondary instruction backup table etc. that holds a copy of original unedited that would be executing?
Or, could a specific "setting" of assembly regeneration be causing this behavior?
Let's start with the big picture of what some fundamental roadblock I may be missing before I start trying to describe finer details.
Again sorry for not having actual code to share but hopefully a real guru will know what's going on and have ideas. Thanks!
Posting my own answer cannot believe I missed this.
The answer is even though it's not installed as an assembly in the GAC, this app behavior changed and I missed that somehow a process ran NGEN.EXE against it to compile the NI native image to a NATIVE IMAGE and install it - which then contains cached version of the friggin machine code in question - exactly what my gut said was happening I just needed to find that "backup copy".