1

I have placed a dll file in the recources property of my app (from myappProperties>>Resources>>add existing file).

Now I want my app to copy this file to a destination on my hard drive.

Is that even possible?

Rudi Visser
  • 21,350
  • 5
  • 71
  • 97
roostaamir
  • 1,928
  • 5
  • 24
  • 51
  • possible duplicate question? - http://stackoverflow.com/questions/7254166/how-to-copy-file-from-resources – NDJ Feb 28 '13 at 20:02

1 Answers1

4

I usually store the resource file (dll, png, whatever) in binary format (byte array).
At runtime i do this:

path = ...
File.WriteAllBytes(path, Resources.binaryStuff);

where Resources is the application's resource instance.

joe
  • 8,344
  • 9
  • 54
  • 80