This article is a mirror article of machine translation, please click here to jump to the original article.

View: 17448|Reply: 1

[ASP.NET] System.Web.Optimization cannot be found in .Net 4.5

[Copy link]
Posted on 10/12/2016 1:09:33 PM | | | |

In MVC4 development, if the project is created as an empty MVC project, then there is no content for BundleConfig.cs item in the App_Start directory and cannot be found in the entire library when manually added: System.Web.Optimization namespace. As shown in the figure below,



So how to find the System.Web.Optimization namespace and complete the addition of BundleConfig.cs content. Here's how: Open the package management console and type: Install-PackageMicrosoft.AspNet.Web.Optimization in the console and press enter.
If you see a prompt in the console: "Microsoft.AspNet.Web.Optimization 1.1.3" has been successfully added.
At this point, you have added the Microsoft.AspNet.Web.Optimization.dll application to your project, and you can find the "System.Web.Optimization" namespace and use the BundleCollection object.






Previous:C# preprocessor instructions
Next:System.IndexOutOfRangeException: 索引超出了数组界限
 Landlord| Posted on 2/11/2018 2:10:13 PM |
@System.Web.Optimization.Styles.Render("~/Plugins/company/lib/bootstrap/css/bootstrap")
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com