Is there a way to precompile MVC application including code and views for deployment?
I am using MVC and when I try to publish my app, I donot get the dialog options that allow you to precompiles views or make the app not updatable. I also tried to directly use aspnet_compiler command line but I get numerous errors for views.
Any solutions, suggestions is greatly appreciated.
Originally when I ran the command line utility I had one file that was not part of vstudio project, which was creating issues. But once that file was taken care of(the file issue wasnot related to the subject of this discussion), the command line worked.
Thanks
Marked as answer by ricka6 on Oct 20, 2009 06:32 AM
Bob K.
Member
7 Points
5 Posts
Precompile MVC applications including views for deployment
Oct 19, 2009 09:50 PM|LINK
Is there a way to precompile MVC application including code and views for deployment?
I am using MVC and when I try to publish my app, I donot get the dialog options that allow you to precompiles views or make the app not updatable. I also tried to directly use aspnet_compiler command line but I get numerous errors for views.
Any solutions, suggestions is greatly appreciated.
MVC Deployment precompile publishing mvc sites aspnet_compiler
jeloff
Contributor
2493 Points
432 Posts
Microsoft
Re: Precompile MVC applications including views for deployment
Oct 20, 2009 12:26 AM|LINK
Hi
You need to install the Visual Studio Web Deployment add-in (see http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en)
In your MVC solution, right click on the MVC project and select "Add Web Deployment Project..."
Jacques
Bob K.
Member
7 Points
5 Posts
Re: Precompile MVC applications including views for deployment
Oct 20, 2009 01:38 AM|LINK
Thanks for your reply Jacques. I did not get a chance yet to test your solution, although I have a feeling it will work.
I also figured out that running the command line utility using aspnet_compiler will also do the job. The command line is:
(framework directory)\aspnet_compiler -v /virtualDirName outputdirectoryName
Originally when I ran the command line utility I had one file that was not part of vstudio project, which was creating issues. But once that file was taken care of(the file issue wasnot related to the subject of this discussion), the command line worked.
Thanks