如何解决 MVC4 Twitter Bootstrap 项目因 VS2012 中的简单 Nuget 安装而失败? [英] How to resolve MVC4 Twitter Bootstrap project fail from simple Nuget installations in VS2012?

查看:33
本文介绍了如何解决 MVC4 Twitter Bootstrap 项目因 VS2012 中的简单 Nuget 安装而失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 Twitter 引导程序启动 MVC4 应用程序时遇到问题.

I'm having an issue with launching a MVC4 application with the Twitter bootstrap.

在 VS 2012 中,我创建了一个新的空 MVC4 应用程序,安装了以下包:

In VS 2012, I created a new empty MVC4 application, installed the following packages:

  • 安装包 twitter.bootstrap.mvc4
  • 安装包 twitter.bootstrap.mvc4.sample

似乎是一些与导航路线选项相关的问题,因为我正在浏览这几篇教程 链接 1链接 2.

Seems like some navigation route options-related issues, as I am going through these few turorials Link 1 and Link 2.

在阅读有关可能的编译问题的注释时,我重新启动了解决方案,但我收到的错误不是自述文件中的错误,而是集中在 NavigationRouteOptionsNavigationRouteFiltersRouteValueDictionaryFilterTokenHasFilterToken:

In reading the note about possible compile issues, I restarted the solution, but errors I'm receiving aren't the ones in the readme and are focused around the NavigationRouteOptions, NavigationRouteFilters, RouteValueDictionary, FilterToken and HasFilterToken:

'System.Web.Routing.RouteValueDictionary' does not contain a definition for 'HasFilterToken' and no extension method 'HasFilterToken' accepting a 
first argument of type 'System.Web.Routing.RouteValueDictionary' could be found (are you missing a using directive or an assembly reference?)   
...AdministrationRouteFilter.cs    18  

'System.Web.Routing.RouteValueDictionary' does not contain a definition for 'FilterToken' and no extension method 'FilterToken' accepting a 
first argument of type 'System.Web.Routing.RouteValueDictionary' could be found (are you missing a using directive or an assembly reference?)   
..AdministrationRouteFilter.cs 20  

The name 'NavigationRouteFilters' does not exist in the current context 

'NavigationRouteOptions' could not be found (are you missing a using directive or an assembly reference?)

我已经确认我也安装了 navigationroutes.mvc4 Nuget 包.

I have confirmed that I do have navigationroutes.mvc4 Nuget package installed as well.

这只适用于 VS 2013 吗?

Is this only working in VS 2013?

Nuget 软件包的日期为 2013 年 10 月 26 日.

The Nuget packages are dated October 26, 2013.

感谢帮助.

推荐答案

github

尝试按以下顺序卸载 1.1.100 并安装 1.0.90 版本.

try uninstalling 1.1.100 and install 1.0.90 versions in the following order.

  • PM> 安装包 twitter.bootstrap.mvc4.sample -Version 1.0.90
  • PM> 卸载包 twitter.bootstrap.mvc4.htmlhelpers -Force
  • PM> 安装包 twitter.bootstrap.mvc4.htmlhelpers -version 1.0.90
  • PM> 卸载包 twitter.bootstrap.mvc4 -Force
  • PM> 安装包 twitter.bootstrap.mvc4 -version 1.0.90

这篇关于如何解决 MVC4 Twitter Bootstrap 项目因 VS2012 中的简单 Nuget 安装而失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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