Sample MSBuild.xml File
** This documentation is out of date and being updated - please download the latest source code and look at the Example web project there **
IMPORTANT NOTE: Please take careful note of the path locations for the following :-
- CssOutputFile (this can be defined in the xml file OR via the msbuild command line argument)
<?xml version="1.0" encoding="utf-8"?>
AssemblyFile="<the path to the dll...>\Yahoo.Yui.Compressor.Build.MsBuild.dlll" />
<!-- Define the output locations. These can be set via the msbuild command line using
If they are not supplied or are empty, then we the value whatever is supplied, below.
<CssOutputFile Condition=" '$(CssOutputFile)'=='' ">SylesSheetFinal.css</CssOutputFile>
Don't forget, you can use the wildcard (eg. *.css, *.js) if you feel up to it.
Finally, at least one item is required - either a css file or a js file.
DeleteCssFiles: [Optional] True | Yes | Yeah | Yep | True | FoSho | Fo Sho. Default is False. Anything else is False. (eg. blah = false, xxxx111 = false, etc)
CssCompressionType: YuiStockCompression | MichaelAshsRegexEnhancements | HaveMyCakeAndEatIt or BestOfBothWorlds or Hybrid; Default is YuiStockCompression.
PreserveAllSemicolons: [Optional] refer to DeleteCssFiles, above.
DisableOptimizations: [Optional] refer to DeleteCssFiles, above.
EncodingType: [Optional] ASCII, BigEndianUnicode, Unicode, UTF32, UTF7, UTF8, Default. Default is 'Default'.
LineBreakPosition: [Optional] the position where a line feed is appened when the next semicolon is reached. Default is -1 (never add a line break).
0 (zero) means add a line break after every semicolon. (This might help with debugging troublesome files).
ThreadCulture: [Optional] the culture you want the thread to run under. Default is 'en-gb'.
IsEvalIgnored: [Optional] compress any functions that contain 'eval'. Default is False, which means a function that contains
'eval' will NOT be compressed. It's deemed risky to compress a function containing 'eval'. That said,
if the usages are deemed safe this check can be disabled by setting this value to True.
PreserveCssComments: [Optional] refer to DeleteCssFiles, above.
<!-- Single files, listed in order of dependency -->
<!-- All the files. They will be handled (I assume) in alphabetically. -->
<!-- <CssFiles Include="$(SourceLocation)*.css" />