[SOLVED] Store files in C# EXE file
- by sublay
It is actually useful for me to store some files in EXE to copy to selected location.
I'm generating HTML and JS files and need to copy some CSS, JS and GIFs.
Snippet
System.IO.File.WriteAllBytes(@"C:\MyFile.bin", ProjectNamespace.Properties.Resources.MyFile);
doesn't work for me!
On "WriteAllBytes" it says:
"cannot convert from 'System.Drawing.Bitmap' to 'byte[]'"
for image and
"cannot convert from 'string' to 'byte[]'"
for text file.
Help!
UPDATE: Solved below.