继续新环境没有asp.net mvc3项目模板的问题

因为两周前的那个问题,但可以打开之前的一个项目没有含有razor,可以顺利打开。但现在有一个asp.net mvc3的razor网站还是无法加载项目。原因是无法安装 Microsoft ASP.NET MVC 4 - Visual Studio 2010 Tools ,无论是使用网站下载的安装包还是用Web Installer,查看日志

OS Version = 6.1.7601, Platform 2, Service Pack 1
OS Description = Windows 7 - x64 Ultimate Edition Service Pack 1
CommandLine = "C:\TDDOWNLOAD\AspNetMVC3ToolsUpdateSetup\setup.exe" 
Using Simultaneous Download and Install mechanism
Operation: Installing
Package Name = Microsoft ASP.NET MVC 3 Tools Update
Package Version = 3.0.20406.0
User Experience Data Collection Policy: Disabled
Number of applicable items: 2
MSI (C:\TDDOWNLOAD\AspNetMVC3ToolsUpdateSetup\AspNetMVC3VS2010Tools.msi) Installation succeeded. Msi Log: Microsoft ASP.NET MVC 3 Tools Update_20120226_211129089-MSI_AspNetMVC3VS2010Tools.msi.txt
MSI (C:\TDDOWNLOAD\AspNetMVC3ToolsUpdateSetup\NuGet.msi) Installation failed. Msi Log:Microsoft ASP.NET MVC 3 Tools Update_20120226_211129089-MSI_NuGet.msi.txt
MSI (C:\TDDOWNLOAD\AspNetMVC3ToolsUpdateSetup\AspNetMVC3VS2010Tools.msi) Uninstall succeeded. Msi Log: Microsoft ASP.NET MVC 3 Tools Update_20120226_211129089-MSI_AspNetMVC3VS2010Tools.msi.txt
Final Result: Installation failed with error code: (0x80070643), "安装时发生严重错误 " (Elapsed time: 0 00:08:06). 

 ======================

 因此,一个旧版的NuGet无法安装,使得我的ASP.NET MVC3 Tools给一起回滚掉了。为什么NuGet无法安装呢,因为之前已经安装了最新版的 NuGet 1.6 了,1.5至1.6的升级有很大更新,以至于自身的在线更新都不成功,需要先卸载1.5才能装1.6。

像我这种情况有两种办法可以解决,一是先卸载NuGet1.6的插件再安装,另一个是解压缩 ASP.NET MVC3 Tools 安装包,单独执行里面的vs10-kb2483190-x86升级文件以及aspnetmvc3vs2010tools.msi。我用的是后者。

至此新项目中同时出现了MVC2,MVC3,MVC4的项目模板。 问题解决。

 

网站也有其他的解决方案,不过可能跟我的情况不同,仅供参考:  

win2003+vs2010下安装asp.net MVC3正式版失败经历

Asp.NET MVC 3 project templates not showing up

希望本文可以对你有所帮助!

posted @ 2012-02-26 22:28  风海迷沙  阅读(2208)  评论(0编辑  收藏  举报