更新上MVC4移动项目CSS所有的Nu​​Get包后不工作 [英] After updating all nuget packages on MVC4 Mobile project CSS doesn't work

查看:112
本文介绍了更新上MVC4移动项目CSS所有的Nu​​Get包后不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建一个使用该解决方案构建和运行正常使用默认的code(当然)移动应用模板的新ASP.NET MVC 4 Web应用程序。的NuGet说,有可为项目提供许多更新。因此,更新所有的人后(更新所有按钮),该解决方案继续建设,但在运行Web应用程序时,将CSS被打破,唯一的计划HTML是显示在浏览器。为什么的NuGet更新后的CSS破?

When I create a new ASP.NET MVC 4 Web Application using the Mobile Application template the solution builds and runs fine with the default code (of course). Nuget says there are many updates available for the project. So after updating all of them (Update All button), the solution continues to build, but when running the web app, the CSS is broken and only plan HTML is displayed in the browser. Why is the CSS broken after the Nuget update?

推荐答案

展望这个我注意到的NuGet正在更新该项目的jQuery 2.0.2。我还发现,jQuery的的最大版本jQuery Mobile的目前支持是1.9.1。所以我让的NuGet更新所有的包,除了jQuery的脚本(这是1.8.2版本中的项目模板)的最新版本。我用的NuGet包管理器控制台和手动更新了jQuery 1.9.1版本,使用下面的命令:

Looking into this I noticed that Nuget was updating the project to jQuery 2.0.2. I also found that the max version of jQuery that jQuery Mobile currently supports is 1.9.1. So I let Nuget update all the packages to their latest versions except the jQuery scripts (which are version 1.8.2 in the project template). I used the Nuget Package Manager Console and manually updated jQuery to version 1.9.1 using the following command:

PM>安装封装的jQuery 1.9.1 -Version -ProjectName

PM> Install-Package jQuery -Version 1.9.1 -ProjectName

一切建造和CSS工作正常。显然,这个版本的NuGet的具有这种特殊的依赖性检查的问题。

Everything built and CSS works fine. Apparently, this version of Nuget has an issue with this particular dependency check.

这篇关于更新上MVC4移动项目CSS所有的Nu​​Get包后不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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