Reputation: 13083
How to make a build in VS 2010 within an ASP.NET MVC application that would remove all of the source code (CS and VB) files? When I build a website or web app I usually copy the contents of the entire solution to the hosting server. Mostly clients get the source but sometimes I do not want to expose the source to the hosting server thus only the Public (or Content) folder, views, masters and the built DLL should be copied.
Manual solutions are not applicable. What do you guys use?
Upvotes: 2
Views: 156
Reputation: 18067
Click Publish from the Build menu, then select File System and deploy into a folder. The contents of that folder should have all the stuff you want and nothing more.
Upvotes: 3
Reputation: 887225
You can add del
commands to the post-build script. (Perhaps wrapped up in a batch file)
You can even write a C# program that deletes the files, then run that in the post-build script.
Upvotes: 0