Quantcast
Channel: MSBuild forum
Viewing all articles
Browse latest Browse all 2763

Including extra files on deploy

$
0
0

Hi,

I need to include a folder and the files in it, into the deployment process.This folder isn't part of the web project. This folder is created on the build server. I cannot include this folder into the web project.

I found this 

http://stackoverflow.com/questions/2747081/how-do-you-include-additional-files-using-vs2010-web-deployment-packages/2748752#2748752

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.


Viewing all articles
Browse latest Browse all 2763