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: Working

Development server rendered code: Not working

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!

War es hilfreich?

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top