3 ms·
> often visual studio will tell you that your change requires a full application restart I suspect this is due a .NET runtime limitation. When you edit your c
by josteink 10y ago
> often visual studio will tell you that your change requires a full application restart
I suspect this is due a .NET runtime limitation.
When you edit your code, as long as you only make modifications inside a method which does not alter the method's declaration and method-signature, you should be fine. Basically, editing compiled code is fine, as long as you are just altering the methods internal IR-code.
If you however end up doing something which alters a method's name, or signature in any way, you end up effectively mutating a class-definition. And there's no part of the .NET runtime which allows that.
As a workaround, you could generate a new class on the fly, but then you would have to update all the existing references to this class in the code... And that probably means invalidating some type-signatures across the line, causing new class-level mutations.
And when all that is resolved, then you would have to port and preserve state for your mutated classes, fake a new stack, etc etc. And then you have turtles all the way down.
Basically at this point, a full recompile is probably the only sane option.
It's a by-product of the static nature of the languages and runtime. I suspect the same applies to JVM based edit-and-go features in Java IDEs.