I have been developing a C# application with Visual Studio 2015 for months now. I have a problem that has just recently creeped up on me. My application solution is a main Windows Forms application with many referenced projects. Each project has some additional static text and xml files that are (were) copied to the bin\debug folder on building the application. Each of these files has its properties set to:
Build Action = Content
Copy to Output Directory = Always
When I Rebuild the Solution, all of the files are copied to the bin\debug application folder correctly as they should be. No problem there.
However, when I click the F11 Step Into, F10 Step, or F5 Run buttons, Visual Studio immediately erases some (about 50%) of the files just prior to stepping into the program!
I checked the Tools/Options/Debugging for a "Do Not Delete Build Content Files" option, but could not find it or any option to prevent this behavior. My application expects to find the content files, so when they turn up AWOL in debugging, it is not good.
Any ideas what I should do to prevent Debug from deleting my files?
Update: This problem is related to StackOverflow question Visual Studio Not Copying Content Files from Indirectly Referenced Projects The key difference is that the previous question has been fixed in Visual Studio. VS Build process now properly copies indirectly referenced project content files. The problem is that VS2015 Update 3, Run Process, is now DELETING those files.