c# - Could not find file ..\bin\Debug\content.dat -


i have added file content.dat in visual studio project @ same location there form1.cs when try read or write file getting error

could not find file '...\bin\debug\content.dat'. 

why trying search in bin\debug? need put file can read/write later need create installer this, reference path distub again?

presumably it's because you're running in bin\debug - that's application being launched.

one option set build action file "content" copy output directory along executable. edit: hans pointed out, should set "copy output directory" property "copy always" or "copy if newer".


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -