开发者

MVC Compiled Views

I want to take a开发者_Python百科 look at my views with reflextor, I have set my project to compile views

<MvcBuildViews>true</MvcBuildViews>

But when opening the DLL for my application in reflextor I do not see the views...

I see the controllers and models but no views...

Have I not compiled the views correctly? or is there more to it?

Thanks,


If you want a fully compiled ASP.NET MVC project with your views compiled, you can either run aspnet_compiler.exe against your web app.

That's the hard way. The easy way is to install the Web Deployment Project add-in to Visual Studio. Then you can add a web deployment project and set it to fully compile your web application.

http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en

It's really easy to use and gets you full compilation.


Is there any chance the views are just being compiled in order to provide you with compile time checking but not actually being included in the assembled output?

It seems like the main goal of this feature could be just to help catch compile time errors quicker not necessarily to speed up the processing of the page or anything.


Views are not compiled in DLL, they are copied as is to the output. Attribute that you use is only compile time check for them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜