I have a custom addition to my .csproj file as below. The expectation is that all folders within Areas/ should be copied to published location/Areas and also LavanyaDeepak.Web.API.dll which is present in folder of Web and ought to have been copied but missed is also addressed.
However neither of the copy is getting accomplished.
<PropertyGroup>
<CopyAreaFiles>
CollectAndCopyAreaFiles;
$(CopyAreaFiles);
</CopyAreaFiles>
</PropertyGroup>
<Target Name="CollectAndCopyAreaFiles">
<ItemGroup>
<AreaFiles Include="Areas*" />
<FilesForPackagingFromProject Include="%(AreaFiles.Identity)">
<DestinationRelativePath>Areas\%(RecursiveDir)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
<ItemGroup>
<WebAPI Include="bin\LavanyaDeepak.WEB.Api.dll" />
<FilesForPackagingFromProject Include="%(WebAPI.Identity)">
<DestinationRelativePath>bin\LavanyaDeepak.WEB.Api.dll</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>