V
Vincenzo Davi
I have created a dll with several classes in C#. One of the classes
references image files in the subdirectories of the bin/Release folder
(basically where the dll resides).
Now, I want to use the dll from a C# Windows application.
In the class that references the images in the subdirectory, I use the
following code to make use of that directory:
Environment.CurrentDirectory
When I reference the dll from the new Windows Application and run, I
get an error saying the images can't be found because it's trying to
find them in that Windows application /bin/Release.
So for example, my dll is:
C:\MyDLLApp\bin\Release\mydll.dll
My Windows app is
C:\MyWinApp\bin\Release\myWinApp.exe
What do I have to do in the dll project to make it reference the dll's
resident directory, not the calling application?
Thanks for any help!
-Vinny Davi
references image files in the subdirectories of the bin/Release folder
(basically where the dll resides).
Now, I want to use the dll from a C# Windows application.
In the class that references the images in the subdirectory, I use the
following code to make use of that directory:
Environment.CurrentDirectory
When I reference the dll from the new Windows Application and run, I
get an error saying the images can't be found because it's trying to
find them in that Windows application /bin/Release.
So for example, my dll is:
C:\MyDLLApp\bin\Release\mydll.dll
My Windows app is
C:\MyWinApp\bin\Release\myWinApp.exe
What do I have to do in the dll project to make it reference the dll's
resident directory, not the calling application?
Thanks for any help!
-Vinny Davi