Reputation: 2245
In my csproj file I have the following:
<CopyAllFilesToSingleFolderForPackageDependsOn>
DeployTemplates;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
DeployTemplates;
$(CopyAllFilesToSingleFolderForMsdeployDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
my DeployTemplate Target looks like this:
<Target Name="DeployTemplates">
<ItemGroup>
<_CustomFiles Include="Views\Shared\Templates\**\*" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>Views\Shared\Templates\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
this works correctly to the extent that it does add these additional files to my PackageTmp folder under Views as expected.
when the actual deployment happen, these files are not deployed, any idea why that happen ?
Upvotes: 0
Views: 351
Reputation: 5452
You could try to override CollectFilesFromContent instead of CopyAllFiles...
<PropertyGroup>
<CollectFilesFromContentDependsOn>
DeployTemplates;
$(CollectFilesFromContentDependsOn);
</CollectFilesFromContentDependsOn>
</PropertyGroup>
Upvotes: 2