Edit 4 (Edit 1 to 3 removed as they where solved)
My last problem is that I would like multiple targets but it does not seem to work. I have to stick them all into the same target what kinda sucks since it would nice to different names so I got to change something I can just look at the target name.
Hi
I am trying to get my MsBuild and it works....if all my stuff is in the same target tag. If I have multiple tags it only does the first one and that's it. None of the other targets are done.
<Target Name="Test1">
<ItemGroup>
<JavaScriptFiles Remove="@(JavaScriptFiles)" />
<JavaScriptFiles Include="..\PathHere\Javascript.js"/>
</ItemGroup>
<CompressorTask
JavaScriptFiles="%(JavaScriptFiles.Identity)"
ObfuscateJavaScript="True"
PreserveAllSemicolons="False"
DisableOptimizations="Nope"
EncodingType="Default"
DeleteJavaScriptFiles="false"
LineBreakPosition="-1"
JavaScriptOutputFile="../Path/Here/(JavaScriptFiles.FileName).min.js"
LoggingType="ALittleBit"
ThreadCulture="en-au"
IsEvalIgnored="false"
/>
<ItemGroup>
<JavaScriptFiles Remove="@(JavaScriptFiles)" />
<JavaScriptFiles Include="..\PathHere\Javascript2.js"/>
</ItemGroup>
<CompressorTask
JavaScriptFiles="%(JavaScriptFiles.Identity)"
ObfuscateJavaScript="True"
PreserveAllSemicolons="False"
DisableOptimizations="Nope"
EncodingType="Default"
DeleteJavaScriptFiles="false"
LineBreakPosition="-1"
JavaScriptOutputFile="../Path/Here/%(JavaScriptFiles.FileName).min.js"
LoggingType="ALittleBit"
ThreadCulture="en-au"
IsEvalIgnored="false"
/>
</Target>
So the above works. If I do this
<Target Name="Test2">
<ItemGroup>
<JavaScriptFiles Remove="@(JavaScriptFiles)" />
JavaScriptFiles Include="..\PathHere\Javascript3.js"/>
</ItemGroup>
<CompressorTask
JavaScriptFiles="%(JavaScriptFiles.Identity)"
ObfuscateJavaScript="True"
PreserveAllSemicolons="False"
DisableOptimizations="Nope"
EncodingType="Default"
DeleteJavaScriptFiles="false"
LineBreakPosition="-1"
JavaScriptOutputFile="../Path/Here/%(JavaScriptFiles.FileName).min.js"
LoggingType="ALittleBit"
ThreadCulture="en-au"
IsEvalIgnored="false"
/>
</Target>
Then the first target will go and the above one will do nothing.