tags:

views:

100

answers:

2

I would like to use a WebSite project instead of a Web Application project for an MVC project.

What is the best way to accomplish this and are there signifigant problems that I might run into?

(as a side note, my reasoning for wanting this is because I have graphic designers who put files into SVN but they don't get added to the "project" and don't show up on deployment or deployment testing. My thought was that switching to a Web Site project might prevent this)

+1  A: 

You don't need to do anything special if you are not using CodeBehind files (if you're using them, it'll be more complex but anyway, it's an MVC app. If you're using them, don't!). Just take an MVC Web app project and put all source files (*.cs) under App_Code directory of the Web site. That said, I fail to see any advantage for it.

Mehrdad Afshari
A: 

The application project allows you to use the Models folder to embed classes into. This would then be compiled for that web project. A web site does not provide for this directly. It would require that you use an assembly project to maintain all of your classes. Rather than converting from one project type to another (which I am not sure how you wold go about doing that) you can simply attach an assembly project to your web application and not store any classes in the model folder of your application.

Having said this, you should keep your web project as an application as there usually are view specific classes that are required such as a your view model classes that belong in the web project.

Andrew Siemer