Core.AspNet.Web.Optimization 1.0.0.26281

dotnet add package Core.AspNet.Web.Optimization --version 1.0.0.26281
                    
NuGet\Install-Package Core.AspNet.Web.Optimization -Version 1.0.0.26281
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Core.AspNet.Web.Optimization" Version="1.0.0.26281" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Core.AspNet.Web.Optimization" Version="1.0.0.26281" />
                    
Directory.Packages.props
<PackageReference Include="Core.AspNet.Web.Optimization" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Core.AspNet.Web.Optimization --version 1.0.0.26281
                    
#r "nuget: Core.AspNet.Web.Optimization, 1.0.0.26281"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Core.AspNet.Web.Optimization@1.0.0.26281
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Core.AspNet.Web.Optimization&version=1.0.0.26281
                    
Install as a Cake Addin
#tool nuget:?package=Core.AspNet.Web.Optimization&version=1.0.0.26281
                    
Install as a Cake Tool

Core.AspNet.Web.Optimization

System.Web.Optimization — script and style bundling. Your existing App_Start/BundleConfig.cs and @Scripts.Render / @Styles.Render calls work unchanged.

<PackageReference Include="Core.AspNet.Web.Optimization" Version="1.0.0" />

Assembly vs package name. The package is Core.AspNet.Web.Optimization; the assembly inside it is Core.Web.Optimization. .NET ships an empty System.Web.dll facade in Microsoft.NETCore.App and the host gives the shared framework precedence, so an app-local System.Web.dll is never loaded — the port therefore cannot use the original assembly names. Namespaces are unchanged, so your code and Inherits= attributes are unaffected; only web.config entries that name an assembly need updating.

Usage

public class BundleConfig
{
    public static void RegisterBundles (BundleCollection bundles)
    {
        bundles.Add (new ScriptBundle ("~/bundles/jquery").Include ("~/Scripts/jquery-{version}.js"));
        bundles.Add (new StyleBundle ("~/Content/css").Include ("~/Content/site.css"));
    }
}
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/jquery")

Call BundleConfig.RegisterBundles (BundleTable.Bundles) from Application_Start. No web.config edit is needed.

What works

Wildcard and {version} includes, IncludeDirectory, per-file and per-bundle transforms, custom orderers, CDN paths, content-hash cache busting, and the debug/release switch — with BundleTable.EnableOptimizations off, views render each file individually so the browser's sources pane shows real file names.

Bundles are concatenated, not minified

Deliberate. The original minified through WebGrease, which is .NET Framework only and long dead, and a substitute minifier that mangles one edge case in your JavaScript fails silently and intermittently — far worse than a larger file. Minify at build time and point the bundle at the output, or use CdnPath.

One mechanical difference

The original intercepts bundle URLs in an IHttpModule registered through a PreApplicationStartMethod; here each bundle registers a route. Bundle routes are inserted at the front of the route table so a conventional {controller}/{action}/{id} cannot claim /bundles/app, and they refuse to generate outgoing URLs so Html.ActionLink cannot accidentally resolve to one.

This means UrlRoutingModule must be registered — which the port's generated root configuration already does for every application.

Documentation

PORTING-GUIDE.md (step-by-step migration from IIS) and LIMITATIONS.md (what differs from ASP.NET on .NET Framework, and why) ship in the repository.

Licence

MIT, as the upstream Mono sources this is built from and the code written for this port. THIRD-PARTY-NOTICES.md ships in the package and says which part is which.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0.26281 88 10/8/2026