Skip to content

Commit

Permalink
Adding the task to the project file to publish to a more sane directory.
Browse files Browse the repository at this point in the history
  • Loading branch information
cobusbernard committed Feb 19, 2016
1 parent 5430cae commit 3ed4384
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/WebApi.Template/WebApi.Template.csproj
Expand Up @@ -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.