将ASP MVC项目从VS2008升级到2010——是否可以不同时升级到.net4
我有一个使用 ASP MVC 框架版本 2 的 Vs2008 项目。我尝试升级到VS2010。我从 svn 获取了一个新副本并打开它。我收到了预期的转换对话框,单击“下一步”,然后单击“完成”。过了一会儿,出现了一个问题:我是否也想升级到 .net 框架版本 4。
我已经用同一个项目完成了两次相同的过程。第一次我点击“否”,第二次我点击“是”。但是,如果我对创建的目录进行比较,则本质上没有区别(某些生成的 dll 有所不同,并且 vbproj 文件中存在路径差异,但仅此而已)。然而,如果我比较新旧项目,我会得到一大堆差异。这当然是预料之中的,但其中一些似乎表明它已经完成了到 .net4 的升级!例如,vbproj 文件现在引用 4 而不是 3.5,因为它是工具版本,并且从 .wsdl 文件生成的用于我的 Web 引用的所有 reference.vb 文件现在都具有“运行时版本:4.0.30319.1”而不是“版本:2.0”。 50727.4927”和Resources.Designer有类似的。
那么,我的问题是,我说“是的,将这个项目的 -net 框架升级到版本 4”的版本和我说“不”的版本之间是否应该有区别,或者 ASP 仍然使用旧版本运行?我真的不想发现我的新版本在部署到可能未安装 .net 4 的生产服务器时不起作用!
I have a Vs2008 project using version2 of the ASP MVC framework. I tried to upgrade to VS2010. I fetched a new copy from svn and opened it. I got the expected conversion dialog, clicked next and then finish. A while later comes up a question do I want to also upgrade to the version 4 of .net framework.
I've done this same process twice wioth the same project. THe first time I clicked no and the second time I clicked yes. But, if i run a diff across the directories created, there's essentially no difference (some generated dlls differ and there's a path difference in the vbproj file but that's it). If, however, i diff the new and old project I get a whole load of differences. That's of course expected, but some of them seem to indicate that it's done the upgrade to .net4 anyway! For example, the vbproj file now referneces 4 instead of 3.5 as it's tools version and all the reference.vb files generated from the .wsdl files for my web references now have "Runtime Version:4.0.30319.1" instead of "Version:2.0.50727.4927" and Resources.Designer has a similar.
So, my question, should there be a difference between the version where I said "yes, upgrade the -net framework to version 4 for this project" and the version where I said no or does ASP run with the old version anyway? I really don't want to find that my new version doesn't work when deployed to production servers which may not have .net 4 installed!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要您不将 MVC 版本升级到 MVC3,您随时可以在项目设置中将其更改回 3.5。其中一些设置可能会显示为 4.0,因为它们依赖于基于 4.0 的 VS2010 设计器,因此需要在设计时引用 4.0 版本。
You can always change it back to 3.5 in the project settings, so long as you don't upgrade the MVC version to MVC3. Some of those settings may say 4.0 because they depend on the VS2010 designer, which is based on 4.0, and thus needs to reference 4.0 versions at design-time.