Click here to Skip to main content
15,893,994 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi folks,

I am trying to implement bundling and minification in asp.net application.
as my project is created .net framework 4.0 version and i am using the same application in visual studio 2012 version.

Is this possible to implement bundling and minification in my project..

web.config file shows target framework as 4.0.

I tried registering bundling in global.asax file.and made debug="false" in web.config
bundle folder is added to browser but the style is not being applied to page as it is coming as normal text without any style..



Please share thoughts..
Posted
Updated 1-Dec-14 17:36pm
v2

1 solution

Bundling and Minification are features of the framework and not of Visual Studio...
These options are part of version 4.5 and that the reason that your 4.0 project can not use them...
Since VS 2012 has support for 4.5 all you have to do is upgrade your project...
 
Share this answer
 
Comments
[no name] 1-Dec-14 2:37am    
thanks for your suggestion...
[no name] 1-Dec-14 2:40am    
i have question.are u sure that we cannot implement it in .net 4.0 frame work version.?thanks..
Kornfeld Eliyahu Peter 1-Dec-14 2:47am    
You can install Web Optimization Framework separately from NuGet. It has a version for 4.0 too and will enable to you to use bundling and minification...
[no name] 1-Dec-14 3:53am    
I tried in .net 4.0 framework.but i don't see a bundle folder created in browser.all files are loaded individually.
I have installed Optimization framework.and registered bundles in application_start method of Global.asax file.when run the application.i see all js/css file are loaded on multiple requests.can you please suggest more on this problem..
Kornfeld Eliyahu Peter 1-Dec-14 3:57am    
bundling and minification are not taking place as long as you are in debug mode - remove debug="true" from compilation node in web.config

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900