использование провайдера dirPath с WebDeploy

У меня есть приложение wcf, размещенное в iis, которое я пытаюсь упаковать с помощью webdeploy. Все отлично работает с инструментами Visual Studio, но мне нужно также создать папку журналов и установить разрешения для нее. Для этого я создал файл ProjectName.wpp.target в своем веб-проекте. Файл выглядит так

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="CreateLogsDirectory" AfterTargets="AddIisSettingAndFileContentsToSourceManifest">   
    <!-- This must be declared inside of a target because the property 
    $(_MSDeployDirPath_FullPath) will not be defined at that time. -->
    <ItemGroup>
      <MsDeploySourceManifest Include="dirPath">
        <Path>$(_MSDeployDirPath_FullPath)\logs</Path>
        <enableRule>DoNotDeleteRule</enableRule>
      </MsDeploySourceManifest>
    </ItemGroup>
  </Target>

  <Target Name="DeclareCustomParameters" AfterTargets="AddIisAndContentDeclareParametersItems">
    <!-- This must be declared inside of a target because the property 
    $(_EscapeRegEx_MSDeployDirPath) will not be defined at that time. -->
    <ItemGroup>
      <MsDeployDeclareParameters Include="LogsDirectoryPath">
        <Kind>ProviderPath</Kind>
        <Scope>dirPath</Scope>
        <Match>^$(_EscapeRegEx_MSDeployDirPath)\\logs
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Target Name="CreateLogsDirectory" AfterTargets="AddIisSettingAndFileContentsToSourceManifest">   
    <!-- This must be declared inside of a target because the property 
    $(_MSDeployDirPath_FullPath) will not be defined at that time. -->
    <ItemGroup>
      <MsDeploySourceManifest Include="dirPath">
        <Path>$(_MSDeployDirPath_FullPath)\logs</Path>
        <enableRule>DoNotDeleteRule</enableRule>
      </MsDeploySourceManifest>
    </ItemGroup>
  </Target>

  <Target Name="DeclareCustomParameters" AfterTargets="AddIisAndContentDeclareParametersItems">
    <!-- This must be declared inside of a target because the property 
    $(_EscapeRegEx_MSDeployDirPath) will not be defined at that time. -->
    <ItemGroup>
      <MsDeployDeclareParameters Include="LogsDirectoryPath">
        <Kind>ProviderPath</Kind>
        <Scope>dirPath</Scope>
        <Match>^$(_EscapeRegEx_MSDeployDirPath)\\logs$</Match>
        <Value>$(_DestinationContentPath)/log</Value>
        <ExcludeFromSetParameter>True</ExcludeFromSetParameter>
      </MsDeployDeclareParameters>
    </ItemGroup>
  </Target>
</Project>
lt;/Match> <Value>$(_DestinationContentPath)/log</Value> <ExcludeFromSetParameter>True</ExcludeFromSetParameter> </MsDeployDeclareParameters> </ItemGroup> </Target> </Project>

я вижу, что провайдер dirPath добавляется в файл sourcemanifest, но при развертывании пакета он пытается создать путь к исходному файлу. По сути, элемент LogsDirectoryPAth не заменяет путь. Кто-то может указать, что мне нужно сделать? Спасибо !

Ответы на вопрос(1)

Ваш ответ на вопрос