7

Is there a way, in visual studio, I could enable code hot swap? In java, using eclipse at least, you can change code at runtime, save it and it will instantaneous change in your application. I know there is the "edit and continue" feature, but I am wondering if there was the same feature for C#.

Philippe Paré
  • 4,279
  • 5
  • 36
  • 56
  • Is there a reason for that? I mean it would clearly be possible if we can change code when paused in debug mode! – Philippe Paré Dec 31 '14 at 08:01
  • I'm not a Microsoft engineer. You would have to ask them for a reason. – Sam Axe Dec 31 '14 at 08:02
  • 3
    To my knowledge neither C# nor Java have "code hot swap" as language feature. I'd be happy to be wrong about Java and gladly read part of language specification that talks about this feature. – Alexei Levenkov Dec 31 '14 at 08:07
  • I read somewhere that you can use the CLR Profiler to hook into the Jitter and inject IL before it gets jitted. Doesn't sound like something I'd ever really want to do though. – Jason Dec 31 '14 at 11:29

1 Answers1

1

The question is unclear. Are you looking for "edit and continue" in C#? That exists since VS2010 (although only if running in 32 bit mode). Or do you want to make your application swap code at runtime? That works as well, but requires manually coding a plugin engine (or using a third party library).

PMF
  • 14,535
  • 3
  • 23
  • 49