sher what about forgeting XML like config file and writing it to a simple text file because your configuration is not so complicated.
Printable View
sher what about forgeting XML like config file and writing it to a simple text file because your configuration is not so complicated.
it think it is ok.
that is your "problem"
dlls cannot have xml settings files. The settings you create are compiled into the dll, which is why everything works on another machine without the config file.
Think about the logic of this for a second.. Dlls are supposed to encapsulate some common functionality. Ergo, why would they have settings? Everything they need should be provided at the time of calling. You'd be annoyed if you had to create an ini file specifying the source and destiantion path every time you used the file.copy command in the .net core dll wouldn't you?
You must be right.
Please see this link and read the section
Changing the Value of a Setting Between Application Sessions
http://msdn.microsoft.com/en-us/libr...69(vs.80).aspx
This is for exe.
So what's the solution?Quote:
You'd be annoyed if you had to create an ini file specifying the source and destiantion path every time you used the file.copy command in the .net core dll wouldn't you?
I gave you it already.. Rethink your program so your DLL doesnt need settings! It's the program that should have settings.. DLLs should be suitably generic so that they do not need them, no?
Tell us more about your DLL and what setting youre trying to make. You said something about "default directory the user picks"? In what context do you mean?
The app is pointed to a certain location in the shared network, as there are some images in some organised folders. The main purpose of this app is to display these images to the users like a library. This is a COM application where it is linked to AutoCAD. This dll will be loaded into AutoCAD and executed using commands. The network share drive I mentioned earlier may be subject to change in future. So if there is a config or ini file, then the person in charge can change the location without tampering the code.