Roslyn 将如何帮助我避免重新编译以将更改部署到我的 ASP.NET 网站? [英] How will Roslyn help me in avoiding a recompile to deploy changes to my ASP.NET website?
问题描述
我对新的 Roslyn C# 编译器有点困惑.
一开始我认为这个新编译器可以在我的 ASP.NET MVC 网站中对 C# 代码进行更改,然后在浏览器中查看这些更改而无需重新构建项目/解决方案.
不过多读一些书,尤其是新的信息,我现在更加确信了.
是否可以使用 Roslyn 对 C# 代码进行更改,例如控制器类,而不必构建项目并且仍然能够看到更改?
是的,Roslyn 可以让您做到这一点,但我建议让 ASP.NET 团队完成作为 ASP.NET vNext 的一部分的繁重工作.
来自 Scott Hanselman 的博客文章(强调他的):><块引用>
使用下一版本的 ASP.NET 您将获得.NET 运行时加上Roslyn"编译器即服务no-compile compile."这意味着在开发期间您可以只需更改您的 C# 类并在浏览器中点击刷新.这是.NET 的力量与更新即开发的活力体验.
I am a little confused about the new Roslyn C# compiler.
In the beginning I assumed that this new compiler would make it possible to make changes to C# code in my ASP.NET MVC web site, and afterwards see these changes in a browser without ever have to rebuild the project/solution.
However doing some more reading, especially the new information, I am now so sure any more.
Is it possible, using Roslyn, to make changes to C# code within e.g. controller class and not having to build the project and still be able to see the changes?
Yes, Roslyn can enable you to do this, but I suggest letting the ASP.NET Team do the hard work as part of ASP.NET vNext.
From the Scott Hanselman's Blog Post on it (emphasis his):
With the next version of ASP.NET you get the power and throughput of the .NET runtime plus the "Roslyn" compiler-as-a-service for a "no-compile compile." That means means during development time you can just change your C# classes and hit Refresh in the browser. It's the power of .NET with the dynamism of a refresh-and-go development experience.
这篇关于Roslyn 将如何帮助我避免重新编译以将更改部署到我的 ASP.NET 网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!