开发者

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

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

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 boo开发者_运维知识库n for web app development in particular.

Could I find anything similar for .NET?


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.


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.


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.


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜