I am working with a C# WPF application, which uses some DLLs. Those DLLs are put in a subdirectory, called "Modules". Both directories (the normal runtime and the "Modules" one) have a directory "Resources", containing the file "agv.png", as you can see:
Prompt> dir /S /B agv.png
C:\<Runtime_Dir>\Modules\Resources\agv.png
C:\<Runtime_Dir>\Resources\agv.png
The DLL I'm working on, has in its runtime environment a "Resources" folder, containing that same file agv.png
.
Nevertheless, while trying to run the DLL, via the application, I get a System.Windows.Markup.XamlParseException
, with the following InnerException
:
IOException: Cannot locate resource 'resources/agv.png'.
I have checked the entire "Locals" window, in order to understand the IOException
, but the only "interesting" information is the _message
, mentioning the same error (without mentioning the absolute path).
Is there a way to get the absolute path of a C# System.IO.IOException
, in order to know for sure where I need to put that agv.png
file?
Thanks in advance