Q1 – When doing a compile/debug is VS supposed to delete existing files in the bin\debug area? (for VS2008)
if no then can I ask please:
Q2 – My winforms checks for existance of a sqlite.db3 file and creates it if it needs to (programmatically). If the behavior I wanted was that each Compile/Debug I do is for the target Debug area to be clear, so that the program would exercise the code that builds the database file, how would I organise this?
thanks
Simply add a PreBuild event.
Edited to add:
Well… looks like someone wants it all chewed up and ready to swallow. Okie dokie!
Navigate to
a.
Compiletab and click on theBuild Eventsbutton if a VB projectb.
Build Eventstab if it’s a C# projectin the
pre-build event command linetype:IF EXIST "$(TargetDir)\sqlite.db3" DEL "$(TargetDir)\sqlite.db3"That should do it.
Next time, fiddle a little longer…