I am using MSBuild/yuicompressor to combine and minify JavaScript.
As part of this process, I want to modify my script references so they have a timestamp in the querystring. That way, a user always gets the non-cached version of the file when a new release is published. For example:
<script type="text/javascript" src="/scripts/combined-minified.js?20100727" />
I am using FileUpdate from MSBuildCommunityTasks to update the <script>
reference, but it does not have a timestamp:
<FileUpdate
Files="@(includeFile)"
Regex="#scriptfiletoken#"
ReplacementText="<script type='text/javascript' src='/scripts/combined-minified.js' />"
/>
What is the best way to output this timestamp using MSBuild?