Wednesday, January 13, 2010

ASP.NET Web Deployment Projects and Subversion

If you are using both ASP.NET Web Deployment Projects and Subversion you might have come across the issue that the deployment project copies entire folders including the hidden Subversion folders called '.svn'.

To prevent files from being included in the deployment you can modify the project file by modifying the ItemGroup element. Here is an example that excludes '.svn' as well as the C# project file and the intermediate files in 'obj':

   <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\**\.svn\**\*.*" />
   <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\*.csproj.*" />
   <ExcludeFromBuild Include="$(SourceWebPhysicalPath)\obj\**\*.*" />
   <!-- further exclude items here -->


MikeG said...

Thanks! this was a big help to me today.

Post a Comment

All comments, questions and other feedback is much appreciated. Thank you!