Downgrade/convert mvc 4 to mvc 3

廉价感情. 提交于 2019-12-02 06:11:07

问题


I know this is a rather odd question, please don't flame me :)

I have a concrete need to "downgrade" a current Asp.Net Mvc 4 (net framework 4.5) application to Asp.Net Mvc 3 (net framework 4.0) because our shared hosting provider does not support .Net 4 (I know it's crazy considering it's been in retail since 12 Aprli 2010 and first beta came out in May 2009 but it's not the point of the post).

Is there any tool, or guide, or anything that could help in the process? I'm getting a bit lost because I upgraded many applications but I never had to downgrade one.

I have use some of the features like begincollectionitem which may not be direct compatible to mvc3


回答1:


I doubt you'll find an official guide or tool, you'll have to do it manually. Personally, I would do the following:

  • Start a new MVC 3 Project (MVC3 is available via nuget)
  • Copy your files from one to the other
  • Fix any compilation issues
  • Use the publish site feature to publish somewhere locally (this will hopefully find compilation issues in your Razor views which don't get found during the project build)
  • Test the site fully!

Sorry it's not more helpful, but I don't think people generally design for the downgrade process.



来源:https://stackoverflow.com/questions/23624143/downgrade-convert-mvc-4-to-mvc-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!