Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

453
Views
Exception thrown in WebGrease.dll after updating to bootstrap 5 MVC

I ran into the problem that after update of bootstrap to v5.0.2 throws an exception (NullReferenceException) in WebGrease.dll while with bootstrap v3 and v4 works fine.

The code below from shared layout:

@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)

The code below from BundleConfig:

bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                  "~/Scripts/bootstrap.js"));

bundles.Add(new StyleBundle("~/Content/css").Include(
                  "~/Content/bootstrap.css",
                  "~/Content/Site.css"));

Checked WebGrease from nuget manager it is updated.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Found it. https://stackoverflow.com/a/45056631/4179709 change the bundle config to new up Bundle object. Not a ScriptBundle object for your bootstrap.js

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!