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
  • 20,568
  • 5
  • 66
  • 95
roostaamir
  • 1,888
  • 5
  • 25
  • 50
  • 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
  • 7,779
  • 8
  • 49
  • 75