0

When I use the "Start without Debugging" button in Visual Studio, my app is copied to a debug directory and runs from there, which I discovered via Environment.CurrentDirectory.

However, there is a text file in the root of the project that I also need to copy, regardless of the build options. When I press "Start without Debugging", this file is never copied, despite the properties set:

enter image description here

Can anyone please provide instructions on what options to include this file when starting without debugging?

EvilDr
  • 8,943
  • 14
  • 73
  • 133
  • 1
    For a simple text file you don't need any build action to be set. You may try with Build Action: "None" – apr Oct 27 '16 at 11:47
  • Wow - I hoped it was easy but didn't think it would be *that* easy. Thanks very much. I since found some reference material when looking up the different Build Action options (http://stackoverflow.com/a/145769/792888) – EvilDr Oct 27 '16 at 13:15

1 Answers1

1

Oddly enough, I don't have the "AdditionalFiles" listed in my WinForms app Build Action, also tried with VS2015. Though setting the Build Action to "Content" works for me, when doing the CTRL-F5.

enter image description here

Chris O
  • 5,017
  • 3
  • 35
  • 42
  • Hi. Yes, I can confirm that *Content* works, although *None* is probably better as @apr suggested based on the supporting reading material in my link. Thanks. – EvilDr Oct 27 '16 at 13:27