0

Could not load file or assembly 'WebGrease, Version=1.5.1.25624, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

and it highlights line 12 in this codes

Line 10:

Line 11:@ViewBag.Title - WeBlog

Line 12: @Styles.Render("~/styles")

Line 13:

Line 14:

Vondella21
  • 79
  • 3
  • 10

1 Answers1

1

Make sure your Views/Web.config has

<dependentAssembly>
  <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
  <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
</dependentAssembly>

And install the latest Microsoft.AspNet.Web.Optimization through NuGet.

beautifulcoder
  • 10,832
  • 3
  • 19
  • 29