Search code examples
c#visual-studiologgingfile-ioresx

Get path of a file from Resources.resx


How do you get the path from a file in the Resources.resx file?

I have the following code:

var value = Properties.Resources.ErrorLog;

Where ErrorLog is .txt file. The code returns the content of the file not the path. Right-clicking and see where it is located is not an option since the project is used on more than one computer.


Solution

  • There is no spoon path.

    These resources are embedded in your EXE file; they don't exist as separate filers at runtime.