Where Did My ASP.NET Bundles Go in ASP.NET 5?

Stuffed BagEdit: There is now a screencast version of this post available.

Since ASP.NET 4.5 in 2012, developers have had access to a pair of tools in their ASP.NET toolbox called “bundling and minification”.  This feature would direct the webserver to combine together CSS or JavaScript files into one extra-large file and then apply a minification algorithm to shrink the size of the file for delivery.  In ASP.NET 5 however, this feature is no longer available.  In this article, I’ll review where bundles were configured and how you can migrate them to the recommended deployment model for ASP.NET 5

In practice, ASP.NET bundles are an easy tool to configure with an entry in the App_Start folder typically called BundleConfig.cs that contained directions for which files to operate on:

.NET 4.5 Bundle Config

.NET 4.5 Bundle Config

We could then reference these bundles in our code with syntax like the following:

That’s actually really easy to use, and ASP.NET will replace those calls to Styles.Render and Scripts.Render with appropriate references to the components of the bundle when running in Debug mode. When my project is running in Release mode, the output is converted to a reference to the concatenated and minified files:

Very cool… the contents of those files are all mashed up and made machine-readable.  There is however one drawback:  those files are created on the fly by the web server and cached in memory.  This could be a processor and memory consuming task that we don’t want to perform that frequently.

What are the new tools available in ASP.NET 5?

Starting with ASP.NET 5, Microsoft is encouraging developers to start integrating some more popular web development tools that other web developers have been using:  Gulp, npm, and bower.  Each of these tools has a specific purpose:

  • Gulp is a task-runner written in JavaScript that runs on top of the NodeJS framework and automates repetitive tasks
  • npm is the Node Package Manager, and it can be used to deliver plugins and utilities that run in the NodeJS framework.
  • Bower is a package manager for delivering static resources from Git repositories.

In a brand new ASP.NET 5 web application that’s built with the standard web site template, these three tools are pre-configured to deliver some content for you:

New ASP.NET Project

New ASP.NET Project

Choosing the ASP.NET 5 Web Site Template

Choosing the ASP.NET 5 Web Site Template

By default, npm is configured to provide the tools necessary to run gulp and bower.  Bower is configured to deliver the following standard JavaScript and CSS frameworks:

Gulp is configured to fetch these libraries with bower and deliver them into the wwwroot/lib folder, with folders for each library.  Nice… but that doesn’t do anything with MY files that I’ve written.

Lets Start Bundling My Files

In this sample scenario, I have two files in the wwwroot/app folder called app.js and menu.js that I want to bundle and deliver to my customers.  To accomplish this, I need to give gulp the extensions it needs to concatenate, rename, and minify my files.  I’ll do this by asking npm to deliver three gulp extensions.  This is accomplished by updating the package.json file that npm uses:

package.json updated

package.json updated

Once I save this file after I add the gulp-concat, gulp-uglify, and gulp-rename line items, Visual Studio will automatically call npm and add these packages to my project.  I can then start writing a task for gulp to operate on my two JavaScript files.  This task is added to the end of my gulpfile.js:

That was easy… and when it runs it will deliver a pair of files for me: dist/all.js and dist/all.min.js This task can be wired up to run before or after build processes, when the project is cleaned or whenever the project is opened using the bindings in the Task Runner Explorer:

Task Runner Explorer

Task Runner Explorer

These bindings are assigned by right-clicking on the task name on the left side and selecting which event I want the task to run on. From that same right-click gesture there is an button to force the task to run now.

How do I tell ASP.NET to use the bundled script in Production, but not Development?

This is the question we solved previously by deriving the state of the project with the Debug or Release mode flags.  That’s not going to work here, because these are static files that are residing on disk, and the ASP.NET pipeline isn’t involved in processing them… gulp already did that heavy lifting for us.  We can task care of this with the new environment TagHelper.

I’ve done a number of posts recently about the introduction of TagHelpers in ASP.NET 5 and MVC 6:

In this case, the Environment Tag Helper comes from the standard ASP.NET TagHelpers collection.  To use this tag, add the following @addTagHelper directive at the top of your razor view:

@addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"

You can also place this directive in a special view called “_GlobalImport.cshtml” in your project.

Next, use the environment tag with its names attribute to wrap the various script or link tags that you need for each environment name that your web application will run in:

Tag Helper in use

Tag Helper in use

Where does the name for the environment come from?  How can I change that name when I deploy my application to another machine?  The answer is in the environment variables set on each machine when the application runs.  Specifically, the environment name is loaded from the ASPNET_ENV variable.  Visual Studio 2015 does a great job in the project configuration screens to configure this value at debug time:

Configuring Environment Variables at Debug time in Visual Studio 2015

Configuring Environment Variables at Debug time in Visual Studio 2015

We set that value here, or with standard set commands on the operating system that the application runs on.

You can now clearly connect the dots and see that the environment tag helper will only include its contained elements if the ASPNET_ENV value matches one of the comma-delimited values in its names attribute.


The bundling capabilities of ASP.NET 4.5 have been dropped, and the replacement is very easy to use.  Support for gulp, bower, and npm is available from all of the normal sources on the web like Stack Overflowand GitHub issues.  With these recommended tools, you can be more productive and your web server won’t have to do the repetitive bundling and compression tasks for your static resources.

  • Pingback: Dew Drop – May 15, 2015 (#2015) | Morning Dew()

  • issafram

    The new feature makes sense.

    But why remove the old Bundle and Minification features from .NET?

    That makes no sense.

    Wasn’t this previously a NuGet package?

    • It previously was a NuGet package, Microsoft.Web.Optimization – and it did a lot of work on the server at run time that you are already pre-calculating when you declare your bundles. Why not just write those files directly to disk, and then you can also take advantage of a CDN to deliver them as well.

      Its a big win the whole way around.

      • issafram

        I agree this is a better way to do things. But why remove a feature when you can just leave it alone or deprecate it?

        • Good question..

          ASP.NET 5 is a complete re-write of the stack, with no HttpModules and HttpHandlers available, which I believe the feature relied on. It is certainly possible to build this feature with the new pipeline model in ASP.NET 5, but the team is starting off by recommending the bower / gulp model hat other web stack developers prefer.

          • andyp69

            If I wanted to code for another web stack, I would already be a developer for another web stack.

            I want to code in the .NET stack, because that’s what I’m most productive in. I want to be productive – not endlessly learning more and more “cool” add-ins that are just another way of doing what I already know how to do, only Microsoft have taken the old way away.
            Oh, but you want to appeal to other web stack developers. Which is fine except they’re already happy on that other web stack, so all you’re doing is ruining the productivity of the developers you already have.

        • Vishwajit Girdhari

          I never liked the bundle approach at all. It is good that it is going away. I always prefer using CDN instead. If MS can help in adding correct CDN entries easily inside the master layouts it will help.

          • Those are completely separate things. You can use a CDN to deliver any files, bundling is about making those files in the first place.

          • CatFish

            The bundle approach supported CDN, with fallover, and cache busting.

      • Ive released this proj in case people need runtime pre-processing in aspnet5 https://github.com/Shazwazza/Smidge

      • jbrinkman

        It seems like MS has forgotten that systems like DNN, Umbraco, Orchard, BlogEngine.net just to name a few, don’t know all of their JS and CSS dependencies at compile time. Once again frameworks are left to roll our own solutions rather than being able to depend on core .Net functionality.

        • Jeff

          You’re dynamically bundling your static references?

      • What do you mean by “lot of work”? Bundles were only processed once at runtime and then cached. It’s far more IO-bound than CPU and unnoticeable even on the first request with most of it happening in a few milliseconds. Unless you have gigabytes of javascript, there’s absolutely no way the old bundling system had any performance impact.

        Rather it took care of a lot of work in a very .NET idiomatic fashion that really didn’t need to be completely removed. I can get that the new features are following a wider standard across platforms but the older stuff should still be available as a package.

  • Christophe Gijbels

    One advantage of the “old” way, was that js changes where automatically picked up and resulted in a new script tag being rendered that included a new version parameter, therefore js changes were automatically picked up by the clients and caching would be invalidated directly as the script tag would effectively refer to a new js resource.
    Are we supposed to manage this versioning ourselves now? Because that would mean instructing gulp to render other output file names and to change the referring script tags accordingly inside the environment tag… Both can go out of sync if not paying attention here, and you’ve to make sure you only generate new names if the js content effectively changed, otherwise client side caching would be invalidated with each new build, which is not good either…

    Or is there something out of the box for this as well?

    • heads5150

      Gulp has an extremely rich ecosystem and can do everything you’ve mentioned.
      Gulp Versioning – https://www.npmjs.com/package/gulp-rev#usage
      Gulp contrib watch – https://github.com/gruntjs/grunt-contrib-watch

      I think its a great move by Microsoft aligning asp net with other web development ecosystrems -angularjs, ruby on rails etc

      • Christophe Gijbels

        Thanks for the pointer to gulp-rev, which seems to handle the js content changes nicely.
        I do agree that the alignment is a good thing, don’t get me wrong, it’s just that when old and new things get compared, one should keep in mind that the new approach doesn’t necessarily mean it can support the old one’s basic features out-of-the-box. Either way, the gulp-rev fixes the build part of the bundling, but I still need to align the script tag pointing to this new resource manually, or at least until I write something to determine the correct js with hash file to be written in the script tag.

      • CatFish

        “Rich environment” is one description… many of the plug-ins are actually to patch on fixes and workarounds for Bower.

  • What a bunch of hooey… Instead of one nice little app_start class to do my bundling/minification, I now have to rely and learn 3 packages that have their own sent of dependencies, write and configure a bunch of magic string JS files, add new entries into my web.config file (more fun magic strings), etc… so *how* is this better?

    • Luis Palacios

      I was the same as you but…Try it out you will know *how* is better

      • Aurelia

        How is it better? I would honestly like to hear…

        • Borat Sagdiyev

          It’s not. MS is just going with the “hey, we use gulp, we are hip now!!” vibe. I honestly think this is the worst decision regarding MVC6.

    • andyp69

      Completely agree. Before, one simple, central location to do one simple, centralised job. Now, learn all these other third party add-ins that may or may not do what you need and may or may not change how they work at any point! It’s insane.

  • Pingback: The Morning Brew - Chris Alcock » The Morning Brew #1862()

  • liamblizard

    From a full stack or solo developers POV this is going to be a bit more work, but if you’re in a large team with specialist front end devs, then congratulations, bundling and minification is no longer your job 🙂

  • I’m with the camp who wishes this was just deprecated. I get that gulp/grunt/bower/npm is “better”, but 1) I have code that uses Bundling today, so this will be one more thing to handle in any migration and 2) at least in the method shown, you have to list the scripts two places (gistfile1.js and inside ) instead of just once in the Bundling approach.

    • Here’s the cool part: bundling and minification was a function of an HttpHandler in the previous ASP.NETs With the open ASP.NET 5 platform, we could write a piece of middle-ware to provide the same functionality with similar configuration.


      • Ziomek

        We could write our own extension in previous versions, it’s not about inventing a wheel all over it’s about reusing good and tested solutions to save time.

      • Aurelia

        But, If it is relatively simple to achieve, why did the ASP.Net team not implement this themselves?

        Instead they removed key functionality, and pointed people at Bower, NPM, Grunt and Gulp… to fit in with the ‘cool kids’. Imagine the number of wasted development hours that will now be amassed by people struggling to simply get back to where they were in a previous version of ASP.Net.

        I agree with the comment that the ASP.Net team obviously do not have experience of building web sites / applications. They need to try using this latest version in the real world, to understand how much damage they have caused.

        • TVSlob

          I am one of those struggling when I could do web forms with my eyes closed and was getting pretty good at MVC 5. If you put your ear to the ground you will hear the sound of millions running from MS.

  • How do revisioning and cache busting work with this new setup. For example, if I have a bundle ~/dist/all.min.js, how can a revisioned version be included in the csproj file? I can use gulp-rev but not sure how to include the new files

  • If, for some reason, I wanted to debug my code CSS/JS code and wanted stuff de-minified/-obfuscated/-bundled, in ASP.NET 4.5 I could just flick the switch in web.config, and IIS would reload the app pools with the updated configuration; will IIS (or kestrel or whatever you are hosting this in) do something similar if I change the ASPNET_ENV environment variable? I’m guessing not, and that I would have to manually recycle my app. Again, it doesn’t feel like an improvement.

    Similarly for deployment, now we are depending on an orthogonal piece of data to determine what mode our application is going to be running in. At least before it was in a configuration file that ships with the application. I guess it’s something you could argue over forever round the water cooler, whether a server is a UAT server because it has an environment variable set up saying that it is, or because the configuration file that you deployed says that it is.

    • Jeff

      In my sample, I show using the environment tag helper to allow you to trap which version works with the processed code or not.

      You can add the ASPNET_ENV variable to another config file on the other servers if you want to be able to flip configuration easily.

  • For those that have been looking for an alternative to continue to deliver bundles in ASP.NET 5, it appears that a project is already up and running on GitHub called Smidge: https://github.com/Shazwazza/Smidge/

    I’ll walk through using Smidge in a blog post this week. Thanks to Damian Edwards for sharing the link to Smidge.

    • Frankie Fajardo

      Thanks for sharing @csharpfritz:disqus. What about Web Essentials 2015 (http://vswebessentials.com/). Isn’t this another way of bundling and minifying js and css? Does that mean I could get away from using NPM and Bower and Gulp if all I needed them for was to minify and bundle my js and css files.

  • Will the current approach work on ASP.NET 4.6 applications built in VS 2015? I can understand that, being a rewrite of the stack, resources would be allocated first to align the dev experience with the ecosystem that was outside Microsoft (bower, gulp, grunt). Perhaps future resources could be allocated based on customer feedback.

    But it is a point well taken that over time it will get harder to use the thousands of packages and scripts and libraries outside of the npm/bower/gulp/whatever is next world purely because more and more library web pages have instructions like this:

    1) Get Started!

    npm install foobarbaz

    2) That’s it!

    I would like to see some thought put into running items in the npm scripts block in Task Runner Explorer… and TRE is a little rough around the edges, but I can see it coming together.

    (for reference on npm as a task runner: http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ I struggled to make this work)

    • Michel Ank

      Hi Chris, have you found some solution for asp.net 4.6?

  • Pingback: ASP.NET 5中的ASP.NET Bundles跑到哪里去了? – 可维GIS()

  • Pingback: Les liens de la semaine – Édition #133 | French Coding()

  • Vaso

    Hi, in your package.json (image) you also added rimraf. Don’t know what it is for but I don’t think that you need that, don’t you? If it is needed as an additional dependency for gulp it will be downloaded on the background automatically? Thanks for your post.

    • Good question. RimRaf is a plugin that cleans folder by removing all contents and subfolders: https://www.npmjs.com/package/rimraf I have it running in a gulp task called “clean” whose source is not pictured.

      • Vaso

        Thanks for explanation! 🙂

        • Aurelia

          It is also now recommended that you use ‘del’ instead of ‘rimraf’. Don’t ask me why – packages just come and go out of fashion on a daily basis.

          Welcome to the crazy world of NPM, Bower and Gulp – you will spend more time fiddling with patches, workarounds, overrides and configuration than actually coding your application.

          • TVSlob

            Not to mention the masochistic effort of trying to get Roles and User Authentication to work.

  • Pingback: Links of the month (May Edition) | Jan @ Development()

  • Tadeusz

    The approaches in ASP.NET5 looks similar to advice to downgrade development craft where plain C programs (supported by Carefully Tuned assembler instructions inside loops) was advised and considered as capable to make everything you need and much more. So please, consider again to re-enable similar to MVC 5.x high-level features, maybe as an option in the MVC 6 project templates. Do not limit us now, to someway-old lower-level school. Even, if the way is frequently modified/modernized. Even, if many, non .NET developer have been trying to use such way to develop everything. For me, it still looking like few step back for LOB development, like using old C with asm inside loops as a better, just because many others used it with extremely flexibility (and magic). Have we prepare to abandon Microsoft (no reason to stay and pay), is the subliminal message from Microsoft?

    • What features are you looking for from MVC 5.x? I don’t think you’re limited in MVC 6 and ASP.NET 5, as they are very early in their life and there is lots of space to build tools on top of them.

      • Tadeusz

        For me, the developer solution (ie. bunch of configuration files and program files and developer support by Visual Studio) is better if all of this requires less tests (also shorter or simpler tests) to assure it fulfils spec. So less magic strings in programs and in configurations, less frequent manual find & funny conditional replace in configs for manual sync program sources, less requirement to install thirty party support just to fill just established VS Asp.NET holes, patches with its own interferences, behaviors and compatibilities fluctuations.
        Of course, magic string-based developing and type-less-based requirements etc. should exist, but as an intentionally used option. I require productivity, then low test and change costs as a must. Only few examples of new problems: MVC6 configs without VS firm support to sync in creation, testing, debugging, staging, deploying; promoting type less vs. reducing typed C# in MVC; now even more pain lack of sync between C# changes and JS parts; requirement to learn (and more frequent use) more new hints and hacks (what and when manually should be modified to just keep working/developing without escalating hidden costs and risks).
        Any such increase of unsafe constructions or principle violation possibilities can be fun for students and sometimes even usable. Now, I feel like persuaded to develop LOB apps more in MASM because of elasticity and unlimited possibilities. So, why stay and pay for Microsoft, if quite similarly unsafe and similarly time-consuming solutions (to develop LOB apps & systems, to manage changes), are already offered by others for almost free.

  • I use Microsoft products because they are simple and I am very productive using them. For Microsoft to dumb down/complicate its products so that they are more acceptable to a wider audience reduces my productivity. All of these over the counter add in products are nothing but a pain in the butt to comprehend, configure, monitor, and maintain. It costs me money and time. We need to create product quickly and move on. No time to implement philosophical theories on how software should be developed. Leave the up to the college professors and keep it out of my shop. I don’t give a rats butt whether Apple or Android or PHP developers ever use Visual Studio. I need my Microsoft team to use it today! So take your dependency inject, inversion of control, gulp, burp, barf, or fart, and shove it. KEEP IT SIMPLE!

    • I think you’ve got some good points here. The approach with ASP.NET 5 at this point is to provide plug-ins and access to a large number of tools, and we can add productivity tools to that mix.

      In all fairness, ASP.NET 5 is still in beta and is looking for feedback exactly like yours. I would recommend adding similar comments to the ASP.NET team’s tooling issue tracker on GitHub: https://github.com/aspnet/Tooling/issues so that we can further discuss this with the ASP.NET team

    • vlince

      Although I agree on some of Biff’s point of view, I also disagree with his *philosophy* that we need to create product quickly and move on.

      This tells me a lot about his idea of how software *should* be built and *his* concern about quality and maintainability.

      It makes me think of a general contractor whose line of business is to flip houses, sell them fast, maximize profit and minimize cost.
      We all know that leads to cutting corners and half-baked features.

      I wouldn’t by a house like that nor would I by products built in a similar

      • Mark

        Exactly. His

      • You’re reaching here.

        To “maximize profit and minimize cost” is called running a proper business. You’re strangely assuming that means cutting corners when the best businesses instead focus on saving time and being more productive (which actually improves the output quality).

        These frameworks are tools and they should be there to help the users and developers, not the other way around.

    • Lachlan Barclay

      This is the best comment on the internet.

  • Luis Palacios

    I cant wait for it ! is there any update on release date? i know we are on RC right now but i want relase date for official update

    • Jeff

      There is a target date planned internally for RTM, but it has not been confirmed or released publicly yet. I can not say more here.

  • Taner Yiğit

    I dont like big changes at all and ms dropped most of the stuff we accustomed. What about the “session”? You should write some code and download a package to enable Session in your project. No doubt, things will turn out old way style as time passes, like the “start menu” case. MS had to bring it back into Windows 10.

    • Jeff

      You’re right, this is a big rewrite of ASP.NET. it’s really v1.0 of a new generation of the platform. That’s why there’s a v4.6 coming out at the same time, so that you don’t have to migrate, and more tools can be built while the base of ASP.NET 5 is made available.

  • Jacob Truong

    it’s unbelievable. .Net before very simple to code, separate code and design clearly. When MVC in .Net appear, *.js begin outbreaks and. Now i see .Net coding like Java. Even .Net come back olden days ( visual studio 2003, not saparate code and design). Why many browser, which have stop run script, and why we use *js?. Many Control removed, (it’s not “what you see it what you get” – microsoft philosophy) that many companies must buy some tool as devexpress, telerik, componentone…. to solve control, problem. And performance, speed data when get in database, after to convert or transfer to script ?? May be i thinks it’s slow when we use these script. for control .net build before.

    And it’s terrible when many js add in asp.net with code difficult to manage (some time,
    my partner smile and said “code smell”…. version js, frameword js, open source js…
    javascript, jquery, node js, angular js, bootstrap, react, google o/i…. important Brower can stop script??

    .Net losing itself. It’s seem like programmers in Java are designing and coding for Microsoft about Visual studio.

  • JohnConnorTM

    Change is scary and when one is expert on a topic that is about to change radically, that creates insecurity and even fear. Change is scary.

    That said I felt the same way when first confronted with “gulp, burp, barf, or fart” like another guy here called it but its also clear to me that the new ASP:NET is much more lightweight and more transparent about what is truly going on under the hood due to these new methods of managing packages..

    What I do miss however is to be able to just use 2015 to develop my MVC 5 projects as before, so that if I do not have time to change, to implement all the new changes, I can just use VS as I used it before. Alternatively or even better, to create a wizards that upgrades a MVC 5 project / solution automatically. I hope that will be possible with the release version of VS 2015.

    Because Biff Henderson here is right, to me as a developer this is cool, but for a businessman who has to spend large amounts of money to implement that change while trying to keep his head over the water, this is a nightmare.

  • I like the approach using TagHelpers, but I don’t want to have to set an environment variable on a deployment system. Do you have a way to default it so that if there is no environment variable, it uses the min files?

    • Check the last screenshot, there is a faux environment variable set in debug mode with Visual Studio.

      • I don’t think that was my question. I was referring to the second last screenshot. In that, environment variables Staging and Production are set to get the min file. How can it be defaulted so that no environment variable is necessary.

        xcopy deployment goes out the window if you have to be responsible for the end system.

  • Frankie Fajardo

    I know the sentiments of those who ask why remove the .NET bundling and minification. It was way easier that using Gulp or Grunt, and their respective plugins.

    I somehow also welcome the support for npm and bower, and even grunt and gulp, as they open new opportunities. I suppose these tools come with their “pros” and “cons”. It is interesting what this blog (http://blog.keithcirkel.co.uk/why-we-should-stop-using-grunt/) says about Grunt (or Gulp) and how you can manage without it, and simply just use npm.

  • CatFish

    Lets face it, this is a disaster. None of it has been thought through – this is obvious by the conversations on the ASP.Net team on Git hub and Twitter. “Er.. that didnt work.. ok, well try this.. oh, just delete it and close the issue”.

    The other problem that Microsoft failed to research before they decided to give up and just plug in someone else stuff – Bower is a minefield of poor quality, misnamed, and misconfigured packages.

    The current estimate from the Bower owners themselves is that 50% – yes, 50% of the packages they host do not expose main files in their bower.json, or some do not even include a bower.json.

    Hence the number of Gulp packages – to fix all the bugs / junk that people have created in this Gulp / Bower paradise.

    Microsoft has a team of hipsters creating ASP.Net 6 that simply cannot, ever, have built a website other than ‘Hello World’. They are obsessed with Omnisharp, so that they can say ‘hey! we have intellisense on Linux running in a VM on IOS’, for the 10 people that want that.

    Meanwhile, existing .Net devs are left scratching their heads and asking ‘why?’

  • irishchieftain

    So how does this all tie in with Web Essentials?

  • Selva

    Hi Jeffrey T. Fritz , If i want to do just the minifcation in Asp.Net 4.5 what i need to do?
    I have a mvc4 application where my js files are scattered around different folders under the folder called “Scripts”. I want to do minify all of my js files? What is the best and easy approach?

  • JonyGreen

    i find a free online js compressor service to compress your js code, so it will reduce the size of web page.

  • Dmytro Bazulin

    This article seems to be missing biggest thing the bundles did (for me at least) – cache busting. Now if all.min.js changes the application will be busted for users who have it cached in the browser.

    • Brendan Alexander

      That is a good questions. Off the top of my head, I would insert some razor syntax to generate a script reference that looked something like all.min.js?x=8998a8dfusadsdfsfsfu9

      • Dmytro Bazulin

        this number has to be smart enough not to change every time browser loads the page, otherwise it will force download of the same js bundle every time.

  • Pingback: Where Did My ASP.NET Bundles Go in ASP.NET 5? | Fritz on the Web | Krux()

  • Pingback: ASP.NET 五中的ASP.NET Bundles跑到哪里去了 – ASP-java知识分享()

  • Carl in ‘t Veld

    Is there a way to maintain the bundle definition centralized on one spot outside gulpfile.js and your razor template?

  • Brendan Alexander

    This post is really helpful. Many thanks. I was wondering where bundling went in asp.net 5.

    I am super happy with asp.net 5. In previous .net versions I was already getting into gulp and moving more of the heavy lifting clientside. I am now busting my chops on Angular2 and I think the asp.net 5 environment in Visual Studio is perfect for it. And lets face it, bundling and minification is a new beast when you have to deal with module loading (so the old bundling approach in earlier .net versions are becoming not so relevant). I am having good success using jspm doing the heaving lifting of bundling modules.

  • Kevin O’Shaughnessy

    I’m starting a new ASP.NET 4.5 project. I’ve always used the ASP.NET Optimization Framework up to now but I am not sure whether I should continue doing this or a JavaScript solution instead.

    On the one hand, JavaScript is the way it is going and making this change now will make it less of a change when the time comes to move to ASP.NET Core.

    On the other hand the team is used to using the ASP.NET Optimization Framework and bringing in a bunch of new dependencies and steps is going to add complexity. Is anyone who has tried both able to give a fair list of the pros and cons of each?

  • Pingback: ASP.NET 5中的ASP.NET Bundles跑到哪里去了? | ITblog()

  • Pingback: ASP.NET 5中的ASP.NET Bundles跑到哪里去了? | ITCode()

  • Kimball Johnson

    The real situation has to do with the Software Markets. The .NET markets are shrinking as open source frameworks and those that know them well deliver lighter-weight products in a demand-driven process that is more agile, provides better UX, and costs less per keystroke with many more keystrokes per minute. I applaud and thank Microsoft for doing the survival trick so quick it makes us sick from the spin and the churn. Those ‘hobby languages’ are competing so hard they make it look easy; and the industrial and business infrastructure they stand on, code on, and deploy on are truly substantial. New cloud build and deploy, security and api, featurette applications pop up every week. Could you do that with ASP.NET 4.0? maybe in a year, if you got $2M and an off-shore team of 65. The effective lifetime of a .NET contractor’s skill-set is maybe three years before he’s sent back to the woodshed. Those that have been able to get along for 8 years without a complete overhaul by Pluralsight, Safari Informit, and Lynda.com are looking like fodder to most hotshot dev managers. I say get down on the keyboard and make this stuff work or cringe in your cubicle. And if you can get it to work, thank the guys who are chunking out the pieces of splice code that gives you enough rope to tie the thing together… like Mads K. and the others. Really! This MV6 with webroot and the transpilers is the only path out of the swamp. And its really a LOT BETTER than it was last year when John Papa was the only guy out there stabbing his index finger at the plan and saying ‘Look right here!’. There’s a lot more real info now than then. But just remember this one thing: there are two agenda’s: 1. frosting the ASP.NET 5 cake with gulp and angular, and 2. migrating open source node stuff off of web storm. Nobody’s saying, ‘hey this solution is for plan 1. and that one is for plan two. you have to read everything very carefully, and spend a lot of time trying things out to see which feature belongs in which plan. If you can get that far, then you know the starting line can’t be far ahead of you.

  • Bort Vinson

    Microsoft lied. Viewstate died!

  • Pingback: Fritz’s 10 Minute Tips – Where did my bundles go in ASP.NET Core? | Fritz on the Web()

  • Pingback: Fritz’s 10 Minute Tips – Where did my bundles go in ASP.NET Core? | Fritz on the Web()