Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
tools
vsnet.act
vsnet.debugging
vsnet.documentation
vsnet.enterprise.tools
vsnet.general
vsnet.ide
vsnet.jlca
vsnet.servicepacks
vsnet.setup
vsnet.vsip
vsnet.vss
vsnet.vstools.office
vstudio.development
vstudio.extensibility
vstudio.general
vstudio.helpauthoring
vstudio.setup
vstudio.sourcesafe
  
 
date: Wed, 23 Jul 2008 10:43:24 -0700 (PDT),    group: microsoft.public.vstudio.general        back       


MSBuild questions   
Hi,

I'm trying to integrate a javascript compressor into my web
application project so it compresses javascript files on PUBLISH only,
however ive got a few problems.

i've been reading things such as this:
http://www.coderjournal.com/2008/05/how-to-create-a-yui-compressor-msbuild-task/
which make sense to me, i think im just missing some background info;
so if someone could fill me in that would be ace :)

I know how to write the custom msbuild task, what i'm stuck with are
the steps to get it working...

Firstly, how do i tell MSBuild to only pass .js files to my task?
I've seen examples suggesting putting something like this in
the .csproj file:

<ItemGroup>
    <JavaScriptContent Include="**\*.js" />
</ItemGroup>

however when i add this, my project then contains two references to
each JS file, one with the buildaction of "Content" and another with
the build action of "JavaScriptContent". Removing duplicates is not an
option because there are millions, and when i add a new file its added
as content and i cant have to rely on my memory to change the
buildaction. What can i do about this?

Secondly I've got a problem getting my task to run on publish, for
possibly two reasons...

im using <Target Name="AfterPublish"> , however this doesnt seem to
run the Task (AfterBuild works). Is that a valid target name? i
thought it was :s

lastly, what is the name of the macro i need to use to get the
published directory, is it "$(TargetDir)..\" ?

Thanks for any advice

Andrew
date: Wed, 23 Jul 2008 10:43:24 -0700 (PDT)   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us