Has something replaced bundleconfig.json in ASP.NET Core MVC 2.1?

Also, as of 2021, please consider my answer on similar SO question here: https://stackoverflow.com/a/66659756/5101

TL;DR; - Use WebOptimizer Core nuget package, by Mads Kristensen, for .NET Core 3+ and .NET 5+


bundleconfig.json was removed from the 2.1 templates because it relied on a tool not created or supported by Microsoft. See https://github.com/aspnet/templating/issues/326.

This file [bundleconfig.json] is for configuring the various incantations of the BundlerMinifier tool, which isn't actually shipped in the templates, or supported by Microsoft.

The ASP.NET Core team has replaced bundleconfig with "libman". Rightclick the project --> Add --> Client Side Library and add the packages you need


Note that this works for net core 2.2, not sure about 2.1. Also note that as of net core 3, it appears 'local tools' should (must?) be used instead: https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#local-tools.

Finally had success configuring pre-build bundling using the (as of writing) recommended BundlerMinifier.Core package.

Add the following to your .csproj file:

  <!-- 
       WARNING: don't update to latest version of BundlerMinifier.Core (as of 3.2.435)! 
         3.0.415 is the latest version that appears to work with this method of
         automating bundling/minification 
  -->
  <ItemGroup>
    <PackageReference Include="BundlerMinifier.Core" Version="3.0.415" />
    <DotNetCliToolReference Include="BundlerMinifier.Core" Version="3.0.415" />
  </ItemGroup>
  <Target Name="RestoreToolsAndBundle" BeforeTargets="Build">
    <Exec Command="dotnet tool restore" />
    <Exec Command="dotnet bundle" WorkingDirectory="$(ProjectDir)" />
  </Target>

Note that this should be all that you need; you shouldn't need the 'Bundler & Minifier' VS extension, nor the 'BuildBundlerMinifier' package.

Attempt a build and you'll hopefully see in Output that bundling and minification have completed, as per your bundleConfig.json.


I had the same problem, I was able to copy over an existing bundle file into the project and that worked for me. You do need to follow this guidance and install the Bundle & Minifier extension … also, make sure you are using VS 15.7.

It does look like the bundle file is not included in the latest project template.