Solved

Why Bundles is not working on certain files - ASP MVC

Posted on 2016-11-14
3
51 Views
Last Modified: 2016-11-17
Hi Experts,

I added a bunch of css previously and its working fine  in bundles config file . But last time added some more css and am not able to get the css . It throws no error and my site is loading without those css.


 bundles.Add(new StyleBundle("~/css/Home").Include(
                "~/css/grid12.css",
                "~/css/james_typography.css",
                "~/css/main.css",
                "~/css/color_scheme_light.css",
                "~/css/colors/color_palette_blue.css",
                "~/css/rapid-icons.css",
                "~/css/js_styles/jquery.maximage.min.css",
                "~/css/responsivity.css",
                "~/css/animate.css",
                "~/css/nivo-lightbox.css",
                "~/css/nivo_lightbox_themes/default/default.css",
                "~/css/owl.carousel.css",
                "~/css/owl.theme.css",
                "~/css/owl.transitions.css"
                ));

Open in new window









Thanks in Advance Experts
0
Comment
Question by:karthik80c
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
SSupreme earned 500 total points
ID: 41886086
Try it like this:
@Styles.Render("~/css/home.css")
bundles.Add(new StyleBundle("~/css/home.css").Include(
                "~/css/grid12.css",
                "~/css/james_typography.css",
                "~/css/main.css",
                "~/css/color_scheme_light.css",
                "~/css/colors/color_palette_blue.css",
                "~/css/rapid-icons.css",
                "~/css/js_styles/jquery.maximage.min.css",
                "~/css/responsivity.css",
                "~/css/animate.css",
                "~/css/nivo-lightbox.css",
                "~/css/nivo_lightbox_themes/default/default.css",
                "~/css/owl.carousel.css",
                "~/css/owl.theme.css",
                "~/css/owl.transitions.css"
                ));

Open in new window

Make sure you don't have home.css in that directory
1
 

Author Comment

by:karthik80c
ID: 41891341
Why we don't have  home.css in directory . Is there any reason on this
0
 
LVL 16

Expert Comment

by:SSupreme
ID: 41891509
Because it creates virtual file, and if there is a file with same name it could break execution. You can give it any name as long as it doesn't exist in that folder.
1

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get this page layout correct 13 30
Changing way home page shows 2 32
How to position loader with CSS 3 40
Under active page on navigation bar 8 14
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question