Is there anything like JRebel for .NET? [closed]
Asked Answered
V

6

35

JRebel is a tool for Java that can automatically swap in new versions of classes to a running JVM. Not only can method implementations be changed, it's also possible to change their signatures, to add new or remove existing methods, and also add/remove fields. About the only thing that cannot do is allow the class hierarchy to be altered on-the-fly. It's a real boon for web app development in particular.

Could I find anything similar for .NET?

Venture answered 11/8, 2010 at 12:59 Comment(3)
What is the particular problem with Asp.Net's ability to hot-swap the whole application when you update the application's files?Gman
JRebel can do this without recompiling the whole application. That means as a user you don't lose session information for example. I'm not sure ASP.NET can do this on a page-by-page basis since all pages are compiled into a single dll. Considering the nature of postback in classic ASP.NET you would probably break that too upon recompiling the whole application.Predella
Someone should answer this question instead of with a "No", but with a development workflow that minimizes restarting iisexpress or whatever web server you are using. For example, unit test more - your code will be more solid when you run it in a web server.Beanpole
T
2

There is no such thing in the .net world.. not so powerful.. there are some thing like Edit and Continue but this is like "Hot replace" in Java and nothing more. The problem is in .net you have the whole model of .dll(s) with their versions and dependencies between dlls pointing to specific version so it is not possible to replace dll without replacing all.

An workaround will be something like compiling the classes, adding tons of assembly redirects, somehow unloads and loads the old dll but it is hell of a hard.

Keep in mind that in java after the "module" JSR is implemented maybe in java 9 we will not have JRebel as well.

Tears answered 3/6, 2013 at 13:53 Comment(0)
A
2

There is not such thing for .Net yet. In the meantime, you can try NCrunch (http://www.ncrunch.net/), which is running your tests in the background and the moment you break or make a test pass it is reported in the test results, so you don't need to wait for rebuild and test execution as it is happening in real time.

Axolotl answered 16/9, 2014 at 17:11 Comment(0)
B
0

Well there is a build in feature since VS 2005 that is called "Edit and Continue". You might take a look... http://msdn.microsoft.com/en-us/library/ms379578(VS.80).aspx.

I think it is not that sofisticated as JRebel.

Bertrando answered 11/8, 2010 at 13:5 Comment(3)
Not really related, and E&C is not really a feature considering how badly it's implemented and how useless it is.Jorge
What JRebel is doing is quite different than Edit and Continue. E&C is a feature you can only use during debugging for one. And the biggest difference is you can't use Edit and Continue for a web application which is hosted in IIS (or the useless Web Development Server). I think the biggest difference is the latter one. If you are developing a large web application Build/Redeploy cycle is the most waste of time.Polygraph
It's too bad it doesn't work in 64-bit. I wish Microsoft would get on that...Ceballos
H
0

Reflection is built into .NET and should be able to do most of those things (writing/altering things at runtime).

It's not going to be as polished and task ready as JRebel, but then again the two frameworks have different structures to begin with. It may not be realistic to think of them as equivalents.

IMHO, runtime substitution as a standard practice sounds like a good way to corrupt the runtime to me. If you need this hot swapping functionality, perhaps you are better off choosing an interpreted language instead of a compiled one.

Also, session is usually something to avoid. If you have to use it for ASP.NET, you can use a few different out-of-the box providers instead of the in process one, or even use profiles instead. MSDN page for state manangement

Hanshansard answered 8/9, 2011 at 18:56 Comment(0)
A
0

How about

Re-JIT

https://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT

Oh well that was not it but maybe useful anyways:

Resilient NGen with Targeted Patching

see https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching

Ash answered 2/9, 2015 at 22:59 Comment(0)
S
-1

There's Rebel.NET which is similar but this requires rebuilding the binaries and can't change code during execution.

Sarcoid answered 28/8, 2011 at 20:42 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.