views:

29

answers:

0

I have a web site I'm trying to publish with Visual Studio's publish option. In that project I also have a custom msbuild task that takes in my javascript files and compresses them and saves them to end with .min.js. These files never make it to the publish directory but when I just do a build (without publishing) they are there.

Here is the relevant sections of my msbuild (JsCompress is my task):

  <ItemGroup>
    <JavaScriptContent Include="Scripts\jquery-1.3.2-vsdoc.js" />
    <JavaScriptContent Include="Scripts\jquery-1.3.2.js" />
    <JavaScriptContent Include="Scripts\jquery.validate-vsdoc.js" />
    <JavaScriptContent Include="Scripts\jquery.validate.js" />
  </ItemGroup>

   <Target Name="AfterBuild" DependsOnTargets="Publish">
    <JsCompress Files="@(JavaScriptContent)" Type="js" />
   </Target>

I'm not sure if it's because these generated files aren't part of the project but even my uncompressed script files don't make it to the publish directory and in fact there is no Scripts directory at all in the publish location.