I need to include a folder and the files in it into the deployment process.This folder isn't part of the project. This folder is created on the build server. I cannot include this files in the project.
I found this answer very helpful.
I've edited my web application csproj file and added this to the end of the file
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>CustomCollectFiles;$(CopyAllFilesToSingleFolderForPackageDependsOn);</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>CustomCollectFiles;$(CopyAllFilesToSingleFolderForPackageDependsOn);</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
<Target Name="CustomCollectFiles">
<ItemGroup>
<_CustomFiles Include="Workspace\build\**\*" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>Workspace\build</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
It should include all files from the folder Workspace\build
and place it in the deployment directory in the same place.
But unfortunately it's not working. I'm not very good with msbuild, so I guess I'm missing something here.