У меня есть файл .wpp.targets, который устанавливает некоторые ACL. Когда я создаю изнутри визуальную студию, исходный файл манифеста, который сгенерирован, содержит пользовательские списки ACL.
Когда я запускаю с моего сервера сборки, он просто не работает. Сгенерированный файл не содержит acl из файла .wpp.targets.
Сервер сборки имеет .net framework 4, установленный в сети, он имеет правильный файл Microsoft.Web.Publishing.targets. Я включил некоторую диагностику из сборки на сервере, где кажется, что свойство "AfterAddIisSettingAndFileContentsToSourceManifest" является ложным. Однако я не знаком с msbuild. Может ли кто-нибудь помочь?
EDIT:
Я заметил, что в моих Microsoft.Web.Publishing.targets есть следующие строки:
<PropertyGroup>
<WebPublishPipelineCustomizeTargetFile Condition="'$(WebPublishPipelineCustomizeTargetFile)'==''">$(WebPublishPipelineProjectDirectory)\$(WebPublishPipelineProjectName).wpp.targets</WebPublishPipelineCustomizeTargetFile>
</PropertyGroup>
<Import Project="$(WebPublishPipelineCustomizeTargetFile)" Condition="Exists($(WebPublishPipelineCustomizeTargetFile))"/>
Однако в выводе msbuild нет ничего о webpublishpipeline. Я не думаю, что мой файл .wpp.targets даже просматривается!
Файл целей:
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<!--
********************************************************************
Task Custom ACLs
********************************************************************
-->
<PropertyGroup>
<!-- Extends the AfterAddIisSettingAndFileContentsToSourceManifest action to also set ACLs-->
<AfterAddIisSettingAndFileContentsToSourceManifest Condition="'$(AfterAddIisSettingAndFileContentsToSourceManifest)'==''">
$(AfterAddIisSettingAndFileContentsToSourceManifest);
SetCustomACLs;
</AfterAddIisSettingAndFileContentsToSourceManifest>
</PropertyGroup>
<Target Name="SetCustomACLs">
<Message Text="Adding Custom ACls" />
<ItemGroup>
<!--Make sure the by default Networkservice/AppPoolIdentity have write permission to the root-->
<MsDeploySourceManifest Include="setAcl" >
<Path>$(_MSDeployDirPath_FullPath)\bin\ABCpdf8-64.dll</Path>
<setAclAccess>ReadAndExecute</setAclAccess>
<setAclResourceType>File</setAclResourceType>
<AdditionalProviderSettings>setAclResourceType;setAclAccess</AdditionalProviderSettings>
</MsDeploySourceManifest>
</ItemGroup>
</Target>
</Project>
Выход msbuild:
[GenerateMsdeployManifestFiles] CallTarget
[22:13:44]: [CallTarget] Target "PipelinePreDeployCopyAllFilesToOneFolder" skipped. Previously built successfully.
[22:13:44]: [CallTarget] Target "GenerateMsDeployManifestSettings" skipped. Previously built successfully.
[22:13:44]: [CallTarget] Target "PipelinePreDeployCopyAllFilesToOneFolder" skipped. Previously built successfully.
[22:13:44]: [CallTarget] Target "GenerateMsDeployManifestSettings" skipped. Previously built successfully.
[22:13:44]: [CallTarget] Target "AddIis7ToSourceManifest" skipped, due to false condition; ($(_DeploymentUseIis) And ($(LocalIisVersion) >= '7')) was evaluated as (False And (7 >= '7')).
[22:13:44]: [CallTarget] Target "AddIis6ToSourceManifest" skipped, due to false condition; ($(_DeploymentUseIis) And ($(LocalIisVersion) < '7') ) was evaluated as (False And (7 < '7') ).
[22:13:44]: [CallTarget] AddContentPathToSourceManifest
[22:13:44]: [AddContentPathToSourceManifest] Using "GetDeployManagedRuntimeVersion" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll".
[22:13:44]: [AddContentPathToSourceManifest] Task "CallTarget" skipped, due to false condition; ('$(AfterAddContentPathToSourceManifest)' != '') was evaluated as ('' != '').
[22:13:44]: [CallTarget] AddIisSettingAndFileContentsToSourceManifest
[22:13:44]: [AddIisSettingAndFileContentsToSourceManifest] Task "CallTarget" skipped, due to false condition; ('$(AfterAddIisSettingAndFileContentsToSourceManifest)' != '') was evaluated as ('' != '').
[22:13:44]: [CallTarget] Target "CollectDatabasesToPublish" skipped, due to false condition; ($(PublishDatabases)) was evaluated as (false).
[22:13:44]: [CallTarget] AddDatabasesToSourceManifest
[22:13:44]: [AddDatabasesToSourceManifest] Task "CallTarget" skipped, due to false condition; ('$(AfterAddDatabasesToSourceManifest)' != '') was evaluated as ('' != '').
[22:13:44]: [CallTarget] WriteItemsToSourceManifest
[22:13:44]: [WriteItemsToSourceManifest] Using "ExportManifestFile" task from assembly "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.Tasks.dll".
[22:13:44]: [WriteItemsToSourceManifest] Task "CallTarget" skipped, due to false condition; ('$(AfterWriteItemsToSourceManifest)' != '') was evaluated as ('' != '').