I have an ASP.NET MVC4 project that I usually publish to the file system with the 'Delete all files prior to publish' option selected. However since the user can now upload assets (eg images) to this website and these assets would not be included in the csproj file, if I were to make a change to the binaries and publish the site then the user uploaded assets would vanish and I'd have a grumpy user or two.
Is there any way of modifying the Visual Studio 2012 publishing process to delete all files except specific types eg *.jpg, *.gif, *.pdf, *.xls?
Crispin