We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(6)
.net 世界里没有这样的东西.. 没有那么强大.. 有一些像编辑和继续这样的东西,但这就像 Java 中的“热替换”,仅此而已。
问题是在 .net 中,您拥有 .dll 的整个模型及其版本以及指向特定版本的 dll 之间的依赖关系,因此不可能在不替换全部的情况下替换 dll。
解决方法是编译类、添加大量程序集重定向、以某种方式卸载并加载旧的 dll,但这非常困难。
请记住,在 java 中实现“模块”JSR 后,也许在 java 9 中我们也不会再有 JRebel。
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.
.Net 还没有这样的东西。同时,您可以尝试 NCrunch (http://www.ncrunch.net/),它正在运行您的测试在后台进行,当您中断或测试通过时,它会在测试结果中报告,因此您无需等待重建和测试执行,因为它是实时发生的。
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.
自 VS 2005 起就有一个内置功能,称为“编辑并继续”。您可以看一下... http://msdn .microsoft.com/en-us/library/ms379578(VS.80).aspx。
我认为它不像 JRebel 那么复杂。
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.
反射内置于 .NET 中,并且应该能够执行大部分操作(在运行时编写/更改内容)。
它不会像 JRebel 那样完善和适合任务,但是这两个框架一开始就有不同的结构。将它们视为等同可能不太现实。
恕我直言,对我来说,运行时替换作为标准实践听起来是破坏运行时的好方法。如果您需要这种热插拔功能,也许您最好选择解释型语言而不是编译型语言。
此外,会话通常是需要避免的。如果必须将其用于 ASP.NET,则可以使用一些不同的开箱即用提供程序来代替进程内提供程序,甚至可以使用配置文件。
状态管理的 MSDN 页面
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
怎么样
https://channel9. msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT
哦,好吧,不是这样,但也许还是有用的:
请参阅 https ://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
How about
https://channel9.msdn.com/Shows/Going+Deep/CLR-45-David-Broman-Inside-Re-JIT
Oh well that was not it but maybe useful anyways:
see https://channel9.msdn.com/Blogs/Charles/Surupa-Biswas-CLR-4-Resilient-NGen-and-Targeted-Patching
Rebel.NET 与此类似,但这需要重建二进制文件并且无法在执行期间更改代码。
There's Rebel.NET which is similar but this requires rebuilding the binaries and can't change code during execution.