Unable to get Twitter.Bootstrap.Mvc4.sample working in empty MVC4 project

I installed Twitter.Bootstrap.MVC4 in the Asp.Net MVC Empty project template, and when I run the application, there are problems with the style lists. It seems to me that they are not connected. Screenshot below.

Bootstrap.MVC4 output

And the chapter section below

<head> <meta charset="utf-8"> <title></title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link href="/content/css?v=o7EqNjjD8FotmTy6On6adamUxH559LswOFRclfNrDPM1" rel="stylesheet"/> <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> <!--[if lt IE 9]> <script src="/scripts/html5shiv.js"></script> <![endif]--> </head> 
+4
source share
3 answers

There is a path error in the BootstrapBundleConfig.cs file.

"~ / Content / bootstrap.css" should be "~ / Content / bootstrap / bootstrap.css"

bootstrap-responsive.css is also missing.

Good luck -)

+10
source

I had a similar problem, this is because when you install the nuget package, it installs the latest boot download, which is now 3.0, and Twitter.Bootstrap.Mvc4.sample is set to 2.x.

If you do not need 3.0, you can download version 2.x and copy the scripts and contents to the appropriate folders.

For 3.0, moving css files from ~ / Content / bootstrap to ~ / Content.

+4
source

If you're just looking for a sample project that illustrates ASP.NET MVC using Twitter Bootstrap, you can download a preliminary visual presentation in the 2013 studio for the Web and create a new MVC project. Bootstrap is available in the MVC template. A new addition to MVC 5. This template will allow you to see the folder structure and make the necessary adjustments to the aforementioned project.

0
source

Source: https://habr.com/ru/post/1497999/


All Articles