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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -