Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6254711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:13:46+00:00 2026-05-24T14:13:46+00:00

I am using T4MVC and the Chirpy plugin in an ASP.Net MVC 3 website

  • 0

I am using T4MVC and the Chirpy plugin in an ASP.Net MVC 3 website and I am loving both of them. Only T4MVC can’t seem to handle the minified js files generated with Chirpy and .yui.js javascript files.
Chirpy is generating .min.js files but the default T4MVC script expects .yui.min.js.

I have made the following adjustments to T4MVC to make it work
In T4MVC.tt.settings.t4 I have added

const string ChirpyJSExtension = ".yui";

And in T4MVC.tt on line 983 I have changed the code in

if (!ExcludedStaticFileExtensions.Any(extension => projectItem.Name.EndsWith(extension, StringComparison.OrdinalIgnoreCase))) {
    // if it's a non-minified javascript file
    if (projectItem.Name.EndsWith(".js") && !projectItem.Name.EndsWith(".min.js")) { 
        if (AddTimestampToStaticLink(projectItem)) { #>
    public static readonly string <#=Sanitize(projectItem.Name.Replace(ChirpyJSExtension,string.Empty))#> = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>") ? Url("<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>")+"?"+T4Extensions.TimestampString(URLPATH + "/<#=projectItem.Name#>") : Url("<#=projectItem.Name#>")+"?"+T4Extensions.TimestampString(URLPATH + "/<#=projectItem.Name#>");
        <#+} else {#>
    public static readonly string <#=Sanitize(projectItem.Name.Replace(ChirpyJSExtension,string.Empty))#> = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>") ? Url("<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>") : Url("<#=projectItem.Name#>");
        <#+}  #>          
<#+}
    // if it's a non-minified css file
    else if (projectItem.Name.EndsWith(".css") && !projectItem.Name.EndsWith(".min.css")) { 
        if (AddTimestampToStaticLinks) { #>
    public static readonly string <#=Sanitize(projectItem.Name)#> = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>") ? Url("<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".css", ".min.css")#>")+"?"+T4Extensions.TimestampString(URLPATH + "/<#=projectItem.Name#>") : Url("<#=projectItem.Name#>")+"?"+T4Extensions.TimestampString(URLPATH + "/<#=projectItem.Name#>");
        <#+} else {#>
    public static readonly string <#=Sanitize(projectItem.Name)#> = T4MVCHelpers.IsProduction() && T4Extensions.FileExists(URLPATH + "/<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".js", ".min.js")#>") ? Url("<#=projectItem.Name.Replace(ChirpyJSExtension,string.Empty).Replace(".css", ".min.css")#>") : Url("<#=projectItem.Name#>");
        <#+}  #>          
<#+}
    else if (AddTimestampToStaticLink(projectItem)) { #>
    public static readonly string <#=Sanitize(projectItem.Name)#> = Url("<#=projectItem.Name#>")+"?"+T4Extensions.TimestampString(URLPATH + "/<#=projectItem.Name#>");
<#+}
    else { #>
    public static readonly string <#=Sanitize(projectItem.Name)#> = Url("<#=projectItem.Name#>");
<#+}
} #>

I hate editing included scripts like this but I saw no other solution.

So does anyone have a better solution for this that leaves the default T4MVC script alone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:13:47+00:00Added an answer on May 24, 2026 at 2:13 pm

    New version of chirpy solve this problem.
    http://chirpy.codeplex.com/SourceControl/changeset/changes/ab7715fabba6

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using T4MVC in our ASP.NET MVC project. I have a statement like
Good day! I'm using ASP.NET MVC 2 and T4MVC and it seems some code
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using preview 4 of ASP.NET MVC Code like: <%= Html.CheckBox( myCheckBox, Click Here, True,
I'm using .NET 3.5, MVC 2 and T4MVC 2.6.42... I have the following action:
I have an ASP.NET MVC 3 web application. I recently installed T4MVC templates by
Using VS2008, C#, .Net 2 and Winforms how can I make a regular Button
I am using T4MVC to redirect to another action return RedirectToAction(MVC.MyController.MyAction());. In result it
I have recently become a T4MVC fanatic and now I seem incapable of using
Yesterday I was having fully compiled ASP.NET MVC 3.0 project. Today when i opened

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.