TrilonIO / aspnetcore-angular-universal

ASP.NET Core & Angular Universal advanced starter - PWA w/ server-side rendering for SEO, Bootstrap, i18n internationalization, TypeScript, unit testing, WebAPI REST setup, SignalR, Swagger docs, and more! By @TrilonIO
https://www.trilon.io
MIT License
1.46k stars 433 forks source link

asp-append-version not working #465

Open Flood opened 7 years ago

Flood commented 7 years ago

Hi, i've just found out that cache busting is not working.

You need to add this row to _ViewImports.cshtml:

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

This will change this:

<script src="~/dist/main-client.js" asp-append-version="true"></script>

into this:

<script src="/dist/main-client.js?v=2kWeND34zp5DcgNlkva1W7uzjxwvt3SBffmNWAJA9Qg"></script>

etatuev commented 7 years ago

Confirmed, did a same thing some time ago.

pd-xpediator commented 4 years ago

@etatuev @Flood Hi, I added @addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers" but still it doesn't seem to append version. I'm using .net core 3.1.2. Is there anything I'm missing?