I have a custom .wpp.targets file which is setting some ACL's. When I build from within visual studio, the source manifest file that is generated contains the custom ACL's.
When I run from my build server, it just doesn't work. The generated file does not contain the acl's out of the .wpp.targets file.
The build server has .net framework 4 installed, web deploy, it has the correct Microsoft.Web.Publishing.targets file. I have included some diagnostics from the build on the server where it seems that the "AfterAddIisSettingAndFileContentsToSourceManifest" property is false. I'm not familiar with msbuild though. Can anyone help?
EDIT:
I noticed that in my Microsoft.Web.Publishing.targets there is the following lines:
<PropertyGroup>
<WebPublishPipelineCustomizeTargetFile Condition="'$(WebPublishPipelineCustomizeTargetFile)'==''">$(WebPublishPipelineProjectDirectory)\$(WebPublishPipelineProjectName).wpp.targets</WebPublishPipelineCustomizeTargetFile>
</PropertyGroup>
<Import Project="$(WebPublishPipelineCustomizeTargetFile)" Condition="Exists($(WebPublishPipelineCustomizeTargetFile))"/>
However there is nothing about the webpublishpipeline in the output from msbuild. I don't think my .wpp.targets file is even being looked at!
The targets file:
<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>
The msbuild output:
[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 ('' != '').
You can change parameter WebPublishPipelineProjectName. MSBuild tries to find (MSBuildProject).wpp.targets by default, e.g. MyProject.wpp.targets. Try to set /p:WebPublishPipelineProjectName=MyProject
I hope this helps you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With