How will Roslyn help me in avoiding a recompile to deploy changes to my ASP.NET website?

给你一囗甜甜゛ 提交于 2020-01-04 06:44:15

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/23984030/how-will-roslyn-help-me-in-avoiding-a-recompile-to-deploy-changes-to-my-asp-net

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!