I am using Umbraco Forms and do not want that the forms included on the development environment are included on the production environment; however I would like them to be included in source control.
Therefore my current setup includes the files under source control as per standard; however to exclude the forms data (App_Plugins/UmbracoForms/Data) I excluded the folder from the project (.CSPROJ). The problem is that after publishing (to file), the data files are always being included anyway, even if they are excluded.
Is there something else going on in the build process that is copying these files to the publish directory?
It sort of depends on how you are doing the publish. If you are just publishing through visual studio, you can add some parameters to the PropertyGroups of your csproj.
There is also some talk about doing this here: Web Deployment FAQ. If you do some googling about
ExcludeFoldersFromDeploymentyou'll find some other ways to do this if you are calling MSBuild yourself.