Try to add the following line to your BundleConfig.cs file
BundleTable.EnableOptimizations = true;
Please note : If you are using bootstrap for MVC you might also have to add this line of code to BootstrapBundleConfig.cs
Frage
I'm still kind of new with ASP.NET MVC, so please excuse me if I'm missing something obvious. I recently just published a site through Visual Studio to our development server to see how everything was working. When I browse to the dev site, none of our styles or Javascript that were defined as bundles show up in our code.
Local test system rendered code:
Development server rendered code:
As you can see between the two rendered source codes, there is no CSS being added to the published code. What can I do to fix this?
Thanks!
Lösung
Try to add the following line to your BundleConfig.cs file
BundleTable.EnableOptimizations = true;
Please note : If you are using bootstrap for MVC you might also have to add this line of code to BootstrapBundleConfig.cs