Tech Junkie Blog - Real World Tutorials, Happy Coding!: End-to-End ASP.NET MVC : Add Bootstrap Library Using NuGet

Saturday, June 18, 2016

End-to-End ASP.NET MVC : Add Bootstrap Library Using NuGet

In the previous blog we've created added the JQuery library to an empty ASP.NET MVC project. In this blog we will add the Bootstrap to the empty ASP.NET MVC project that we've just created.

Step by Step Instructions:

1. Open the empty ASP.NET MVC project that you've just created

2.  Right click on the the "References" node in the "Solution Explorer", then select "Manage NuGet Packages"

3.  In the search box on the right of NuGet window type "bootstrap", the search result will be displayed.  You will see that an earlier version was installed, click the "Update" button to upgrade to the latest stable version. Then click "OK" on the "Preview Changes" dialog.

4.You will see that the latest version has been installed.

6.  Now you should see the Bootstrap scripts in the "Scripts" folder

7.  You will also noticed that the "Contents" folder has been created, this folder was created when NuGet installed the Bootstrap library in the "NorthwindCafe" project. This folder contains the cascading stylesheet that Bootstrap uses

8.  Now let's test our bootstrap installation, in the "Index.cshtml" type in the following markup

    Layout = null;

<!DOCTYPE html>

    <meta name="viewport" content="width=device-width" />
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script src="~/Scripts/bootstrap.min.js"></script>
    <div class="jumbotron">
        Hello Bootstrap!
        <p><a class="btn btn-primary btn-lg" href="#" role="button">Installed</a></p>


9. When you press Ctrl+F5 to run the application you should see the following in your browser

Similar Posts:


  1. Hi
    i'm trying to install bootstrap with NuGet, but it told me "Incompatobe: use Bower insted"
    i was try update Nuget but seems i have latest version, maybe any idea what can be the reason?

  2. Hello everyone, great article. I have a question on how to add the Bootstrap library to java. There was a need to put the Bootstrap template on the site, but there is no necessary library. Who has experience of such work, write, please, it is very necessary

  3. Thanks for sharing.

  4. This comment has been removed by the author.

  5. This comment has been removed by the author.

  6. This comment has been removed by the author.

  7. This comment has been removed by the author.

  8. This is my first visit to your web journal! We are a group of volunteers and new activities in the same specialty. Website gave us helpful data to work. hoverwatch coupon code

  9. The best tech organizations are those that do serious research on the business that they are associated with. gadgets

  10. I appreciate this article for the well-researched content and excellent wording. I got so interested in this material that I couldn’t stop reading. Your blog is really impressive. visit this website

  11. I am very enjoyed for this blog. Its an informative topic. It help me very much to solve some problems. Its opportunity are so fantastic and working style so speedy. useful link


  12. I have read your excellent post. This is a great job. I have enjoyed reading your post the first time. I want to say thanks for this post. Thank you…
    Custom Packaging Boxes

  13. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. Breast Cancer Prevention


Search This Blog