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 8338635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:39:16+00:00 2026-06-09T04:39:16+00:00

I’ve been attempting to get minification and bundling working on my MVC3 project for

  • 0

I’ve been attempting to get minification and bundling working on my MVC3 project for some time, trying out quite a few different compressors and methods. I’ve finally settled on using Microsoft Ajax Minifier via an msbuild task in my project file. I’m only so far in to my configuration, but I’ve hit an immediate stumbling block; when I minify and combine my JS scripts in to a single file (using the task definition below), my combined file always contains two minified copies of each script.

I’ve cut out all other complicated msbuild tasks I’ve added, removed all but one JS script, and it’s still happening. The below tags are the only part of my project file that I have manually modified:

<UsingTask TaskName="AjaxMin" AssemblyFile="$(MSBuildProjectDirectory)\..\_Build\AjaxMinTask.dll" />
<Target Name="AfterBuild">
    <ItemGroup>
        <JsFiles Include="**\res\js\libs\jquery.js" />
    </ItemGroup>
    <AjaxMin Switches="-global:jQuery,$" JsSourceFiles="@(JsFiles)" JsCombinedFileName="Combined.min.js" />
</Target>

Combined.min.js is created in the root of my web project (as expected), but it contains two minified copies of the jquery.js file.

I’m using Microsoft Visual Studio Ultimate 2012 RC (Version 11.0.50706.0 QRELRC July, 2012) and the references “AjaxMinTask.dll” file is the latest version (4.59.4576.13505) from here.

Now, here’s the weirdest thing. Additionally, I have created completely new MVC3 projects in both VS 2010 and VS 2012, and copied & pasted the above lines in to their project files – only changing the path to AjaxMinTask.dll (to use the same as the broken project) and the path to the JQuery file (\scripts\jquery..js), and they work perfectly fine.

Unfortunately I can’t paste the project file as it’s too long for stack overflow, so I’ve zipped it up with the original jquery file I’m trying to minify / combine, the resulting “minified” file, and the AjaxMin assemblies I’m using:

[ Url Redacted ]

Alternatively, I’m very open to any other suggested methods that will allow me to minify / combine when I build in release mode in Visual Studio 2012, using .Net 4.0 and MVC 3.

  • 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-06-09T04:39:18+00:00Added an answer on June 9, 2026 at 4:39 am

    Well, here’s a weird gotcha… I’ve managed to fix this (after days of faffing about!) by either changing the “js” directory to another name (“javascript”):

    <JsFiles Include="**\res\javascript\libs\jquery.js" />
    

    or removing the “**\” from the beginning of the path:

    <JsFiles Include="res\js\libs\jquery.js" />
    

    I suspect this is a bug of some sort.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.