Answer the question
In order to leave comments, you need to log in
Working with ASP.net MVC controllers without compiling them (editing on the fly like in ASP.Net Webforms)?
Hello.
I do mostly web projects on ASP.Net Webforms.
Now I started to make a project on ASP.net MVC 4. There was such a question.
ASP.Net Webforms has the ability to publish a site without compiling the project (for example, the bin directory can be completely empty). And all sources are placed in the site directory. IIS compiles the project on the fly. And if there is a need to quickly fix something in the code, I simply open the *.cs file in Notepad, change what is required, and when I save, IIS will recompile the project itself the next time it is accessed.
Is it possible to do something similar in ASP.net MVC, because when I do Publish, Studio compiles all the code into a dll, leaving only view's available to me, not allowing me to edit the code of controllers and models on the fly.
Answer the question
In order to leave comments, you need to log in
It seems to me that editing controller code on the fly is a very bad idea. In the age of introducing TFS into our lives, and github to edit the code in production is bad manners.
It is worth noting that this is not a reason to transfer logic to views!
Now you can enable editing in VS, but you still have to build the project to apply it. It remains to wait for Roslyn (the next version of the compiler). Then this focus will be possible, as I understand it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question