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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:02:04+00:00 2026-05-24T05:02:04+00:00

I hooked up YUI Compressor to my MVC 3 project. I got one folder

  • 0

I hooked up YUI Compressor to my MVC 3 project. I got one folder with css files and another one with js files. When building, I want to include all of the files from css directory, except for one. Same goes for js. How can I accomplish that?

Here is the XML:

<Target Name="AfterBuild">
  <CallTarget Targets="Compress" Condition=" '$(Configuration)' == 'Release' " />
</Target>
<Target Name="Compress">
  <ItemGroup>
    <!-- Single files, listed in order of dependency.  Use * for wildcards -->
    <CssFiles Include="$(ProjectDir)\Content\*.css" Exclude="$(ProjectDir)Content\All.css" />
    <JavaScriptFiles Include="$(ProjectDir)\Scripts\*.js" Exclude="$(ProjectDir)Scripts\All.js" />
  </ItemGroup>
  <MakeDir Directories="$(ProjectDir)..\JsCssRelease" />
  <CompressorTask 
     CssFiles="@(CssFiles)" 
     DeleteCssFiles="false" 
     CssOutputFile="$(ProjectDir)..\JsCssRelease\All.css"
     CssCompressionType="YuiStockCompression" 
     JavaScriptFiles="@(JavaScriptFiles)" 
     ObfuscateJavaScript="True" 
     PreserveAllSemicolons="True" 
     DisableOptimizations="False" 
     EncodingType="Default" 
     DeleteJavaScriptFiles="false" 
     LineBreakPosition="-1" 
     JavaScriptOutputFile="$(ProjectDir)..\JsCssRelease\All.js" 
     LoggingType="ALittleBit" 
     ThreadCulture="en-us" 
     IsEvalIgnored="false" />
</Target>

I can’t seem to find any more info then there is at
http://yuicompressor.codeplex.com/.

What currently happens is that it includes all files and doesn’t exclude the ones specified.

  • 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-24T05:02:04+00:00Added an answer on May 24, 2026 at 5:02 am

    driushkin’s comment was on the right way. You have an extra slash after $(ProjectDir) in the Include attribute but not on the Exclude one, leading to different file names, even if \\ instead of \ still works to access the files.

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

Sidebar

Related Questions

I'm using ASP.NET MVC with IIS 7.0. I've got 404 errors hooked up fine
I have 2 keyboards hooked up to my machine (one on PS/2, the other
I've got an NSBrowser hooked up to an NSTreeController bound to an array of
I have NHibernate hooked up in my asp.net mvc application The ISession is injected
I have NHibernate hooked up in my asp.net mvc app. Everything works fine, if
I've got a datagridview that is hooked up to a bindingsource on my main
I have my macbook pro hooked up to an apple cinema display. I want
So I've got an NSSearchField hooked up directly to an NSArrayController via bindings, attached
Sorry for the semi-rant here. I am hooked on javascript and want some direction
I've got a pretty large DB hooked up to my Entity Framework. I've got

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.