0

I have a program that needs a XML conf file with a few variants. When I compile the program in C# (Visual Studio 2019), it give me a DLL file. That Dll is going to be for example to

'C:\Program Files x86\example\example.dll'

In same path I have my conf file

'C:\Program Files x86\example\conf.xml'

I only work with the Dll and the conf file.

I DON'T USE MY PROYECT ONLY DLL

So, how can my dll get from the conf file some information from it?

What I need is both files are in the same folder but the XML doesn´t work there. So I need to put something in my Dll to -> if I change of folder my Dll , I will change xml file to the same folder. So what I need it´s to put in my program that anypath were the Dll file is, get that path and read the xml file. Because both files will be in the same path.

  • You open it and read the information. Can you explain what your exact problem is? Can you open the file? Can you read from it? Can you parse the information into something usable? What *can* you do so far and *where* exactly are you stuck? – nvoigt Sep 21 '21 at 08:35
  • What I need is both files are in the same folder but the XML doesn´t work there. So I need to put something in my Dll to -> if I change of folder my Dll , I will change xml file to the same folder. So what I need it´s to put in my program that anypath were the Dll file is, get that path and read the xml file. Because both files will be in the same path. – AlexDevelop29 Sep 21 '21 at 08:46
  • So your actual problem is finding out where your dll is located in the file system? – nvoigt Sep 21 '21 at 08:55
  • yes, that is but I don't need the path of compilation. Only to find where is my dll and the open the xml file – AlexDevelop29 Sep 21 '21 at 09:02

0 Answers0