E
E
EllaVS2012-09-12 14:07:39
ASP.NET
EllaVS, 2012-09-12 14:07:39

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

5 answer(s)
D
Dmitry Guketlev, 2012-09-12
@Yavanosta

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.

B
Barada, 2015-04-02
@Barada

It is worth noting that this is not a reason to transfer logic to views!

N
Nikita, 2013-08-07
@Nigrimmist

No, unfortunately (or fortunately?), you can’t

M
MrPopter, 2014-10-14
@MrPopter

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.

A
Aram Aramyan, 2015-10-23
@GreenBee

Can. It is enough to put the controller in the App_Code folder

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question