更改MVC 5和.NET目标框架 [英] Changing MVC 5 and .NET target framework
问题描述
我得到了MVC 5,.NET 4.5项目的代码,问题是我们的服务器太旧了,无法使用.NET 4.5。
I was given the code to a MVC 5, .NET 4.5 project, problem is our server is too old to use .NET 4.5.
我也读取MVC 5不能在.NET 4上运行:
我可以在.NET Framework 4.0上运行MVC 5应用程序吗?
I've also read that MVC 5 cannot be run on .NET 4: Can I run MVC 5 application on .NET Framework 4.0?
有什么方法可以在不重新启动整个项目的情况下进行还原吗?回到旧版本?另外,如果这比我预期的简单得多,那么您可以将我的方向正确吗?
Is there any way, without restarting the entire project, to revert back to older versions? Also if this is much simpler than I anticipated, then can you direct me in the right direction?
推荐答案
在MVC5上,您将需要.NET 4.5。您也许可以改而创建一个新的MVC 4项目并迁移代码,这应该不会造成太大的麻烦,但是您应该先检查出差异是什么,并根据需要进行调整。
If you want to keep it at MVC5 you will need .NET 4.5. You could perhaps create a new MVC 4 project instead and migrate the code over, which should not be too much trouble but you should check out what the differences are first and accommodate as necessary.
这篇关于更改MVC 5和.NET目标框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!