MSDeploy Package has Missing Files

 ̄綄美尐妖づ 提交于 2019-12-05 22:45:48

The issue here is that the CopyAllFilesToSingleFolderForPackage target itself is not getting called from the VS2012 targets. We made a lot of changes and this may be a regression on our side. I will look into this to see if there is anything that we can do. Fortunately it should be pretty straight forward to update this to get the behavior that you are looking for. Instead of using CopyAllFilesToSingleFolderForPackageDependsOn you should be able to use PipelineCollectFilesPhaseDependsOn as an alternative. You should be able to change what you have above to

<PropertyGroup>
    <PipelineCollectFilesPhaseDependsOn>
      CustomCollectFiles;
      $(PipelineCollectFilesPhaseDependsOn);
      </PipelineCollectFilesPhaseDependsOn>    
</PropertyGroup>

<Target Name="CustomCollectFiles">
    <Message Text="Inside of CustomCollectFiles" Importance="high"/>
    <ItemGroup>
      <_CustomFiles Include="C:\Temp\_NET\WAP-AfterPublish\MvcApplication1\additional files\**\*" />

      <FilesForPackagingFromProject  Include="%(_CustomFiles.Identity)">
        <DestinationRelativePath>additional files\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
      </FilesForPackagingFromProject>
    </ItemGroup>
</Target>

I just tried this for both VS2012 as well as VS2010 so this seems like a better to solution then the CopyAllFilesToSingleFolderForPackageDependsOn approach. Can you try that out and let me know what you find out?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!