开发者

Visual Studio 2010 Deployment package

开发者 https://www.devze.com 2023-01-17 08:06 出处:网络
I want to use this task in the VS2010 Web Application package deployment process to compress the javascript files:

I want to use this task in the VS2010 Web Application package deployment process to compress the javascript files:

  <Target Name="CompressJS">
    <ItemGro开发者_如何学运维up>
      <_JSFilesToCompress Include="*.js" />
    </ItemGroup>
    <Message Text="Compresing Javascript files $(_PackageTempDir)" Importance="high" />
    <JSCompress Files="@(_JSFilesToCompress)" />
  </Target>

I tried in some locations like OnAfterPipelinePreDeployCopyAllFilesToOneFolder, but it won't work. In WDP I used to have it like:

  <PropertyGroup>
    <BuildDependsOn>
      $(BuildDependsOn);
      CompressJS;
    </BuildDependsOn>
  </PropertyGroup>


Instead of trying to modify the BuildDependsOn property group, I'd try to get your target to fire after compile or before drop build. Check out c:\Program Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets for various targets to override.

<PropertyGroup>
  <AfterCompileSolutionDependsOn>
    CompressJS;
  </AfterCompileSolutionDependsOn>
</PropertyGroup>

<Target Name="AfterCompileSolution" DependsOnTargets="$(AfterCompileSolutionDependsOn)">
</Target>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号