简体   繁体   中英

Bundles not appearing after website publish

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!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM