Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

abp-href not supporting asp-append-version="true" #7484


User avatar
0
razkhan78 created

Hello, We have boilerplate project , in layout.cshtml we have render following css file

<link rel="stylesheet" abp-href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css" asp-append-version="true" />

I have alredy added asp-append-version attriubtue that render with version and whenever we change anything in css file it will update in next publish But we abp-href attribute not allowing to render version.

If i replace abp-href with href only then it renders like below on the page

<link rel="stylesheet" href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css?v=0l9zLicnowsXZpVQU1j7_kKT4IoqT-6EWfm-5dkrzqo&amp;v=0l9zLicnowsXZpVQU1j7_kKT4IoqT-6EWfm-5dkrzqo" href="/view-resources/Areas/App/Views/_Bundles/vendors.bundle.css" />

Can you please guide us what is the use of abp-href and why it is not working with versioning ?

Our boilerplate version is 4.0


6 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    Our boilerplate version is 4.0

    Are you talking about Zero?

    • What is your product version?
    • What is your product type (Angular or MVC)?
    • What is product framework type (.net framework or .net core)?

    Or is it a free startup template for ABP?

  • User Avatar
    0
    razkhan78 created

    Are you talking about Zero? --> Yes

    What is your product version? --> 4.0

    What is your product type (Angular or MVC)? --> MVC

    What is product framework type (.net framework or .net core)? --> .net core

    Or is it a free startup template for ABP? --> No it is not free startup it is paid.

  • User Avatar
    0
    maliming created
    Support Team

    Can you share the complete code for your AbpZeroTemplateLinkHrefTagHelper.cs and AbpZeroTemplateScriptSrcTagHelper.cs?

    Of course you can also refer to the latest TagHelpers code.

    https://github.com/aspnetzero/aspnet-zero-core/tree/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/TagHelpers

  • User Avatar
    0
    razkhan78 created

    We found these files from code, do we need to change them?

  • User Avatar
    0
    razkhan78 created

    Can you please reply us ? what should we do ?

  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, can you share the code of how you use with and without abp-href?

    as mentioned by @maliming, you can share the tag helper at https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/TagHelpers/AbpZeroTemplateLinkHrefTagHelper.cs with one in your project to check if there is any difference