Permalink
Browse files

Adding the task to the project file to publish to a more sane directory.

  • Loading branch information...
cobusbernard committed Feb 19, 2016
1 parent 5430cae commit 3ed4384939f45bda82065df202030e1765a0412d
Showing with 24 additions and 0 deletions.
  1. +24 −0 src/WebApi.Template/WebApi.Template.csproj
@@ -266,4 +266,28 @@
</Target>
<Target Name="AfterBuild">
</Target> -->
<PropertyGroup>
<PackagePath Condition=" '$(PackagePath)'=='' ">Website</PackagePath>
<EnableAddReplaceToUpdatePacakgePath Condition=" '$(EnableAddReplaceToUpdatePacakgePath)'=='' ">true</EnableAddReplaceToUpdatePacakgePath>
<PackageDependsOn>
$(PackageDependsOn);
AddReplaceRuleForAppPath;
</PackageDependsOn>
</PropertyGroup>
<Target Name="AddReplaceRuleForAppPath" Condition=" '$(EnableAddReplaceToUpdatePacakgePath)'=='true' ">
<PropertyGroup>
<_PkgPathFull>$([System.IO.Path]::GetFullPath($(WPPAllFilesInSingleFolder)))</_PkgPathFull>
</PropertyGroup>
<!-- escape the text into a regex -->
<EscapeTextForRegularExpressions Text="$(_PkgPathFull)">
<Output TaskParameter="Result" PropertyName="_PkgPathRegex" />
</EscapeTextForRegularExpressions>
<!-- add the replace rule to update the path -->
<ItemGroup>
<MsDeployReplaceRules Include="replaceFullPath">
<Match>$(_PkgPathRegex)</Match>
<Replace>$(PackagePath)</Replace>
</MsDeployReplaceRules>
</ItemGroup>
</Target>
</Project>

0 comments on commit 3ed4384

Please sign in to comment.