你可以转换一个ASP.NET MVC应用程序使用ASP.NET MVC,并可能在运行什么问题到网站? [英] Can you convert an ASP.NET MVC Application to a Web Site using ASP.NET MVC and what problems might you run into?

查看:83
本文介绍了你可以转换一个ASP.NET MVC应用程序使用ASP.NET MVC,并可能在运行什么问题到网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一个网站项目,而不是一个Web应用程序项目的一个MVC项目。

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?

(作为一个方面说明,我想为这个推理是因为我是谁把文件放到SVN图形设计师,但他们不被添加到项目,并不在部署或部署测试显示出来。我以为是切换到一个网站项目可能prevent本)

(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)

推荐答案

您不需要,如果你不使用做任何特殊 codeBehind 文件(如果你使用它们,这将是更加复杂,但无论如何,这是一个MVC应用程序。如果你使用它们,不要!)。就拿一个MVC的Web应用项目,并把所有的源文件(*的.cs) APP_ code 的网站目录下。不过,我看不出有什么好处吧。

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.

这篇关于你可以转换一个ASP.NET MVC应用程序使用ASP.NET MVC,并可能在运行什么问题到网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆