przy użyciu dirPath Provider z WebDeploy

Mam aplikację wcf hostowaną w iis, którą próbuję spakować za pomocą webdeploy. Wszystko działa świetnie z narzędziami do wizualnego studia, ale muszę także utworzyć folder dziennika i ustawić na nim uprawnienia. W tym celu utworzyłem plik ProjectName.wpp.target w moim projekcie WWW. Plik wygląda tak

<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>

widzę, że dostawca dirPath jest dodawany do pliku źródłowego, ale kiedy wdrażam pakiet, próbuje utworzyć ścieżkę do pliku źródłowego. Zasadniczo element LogsDirectoryPAth nie zastępuje ścieżki. czy ktoś może wskazać, co muszę zrobić? dzięki !

questionAnswers(1)

yourAnswerToTheQuestion