Question

I would like to insert an external INI file inside a dll project, using Visual Studio. Is it possible to do so?

Was it helpful?

Solution

You can add a file of any type to your project, but this may not solve your problem. When the dll tries to read the file it probably won't find it.
You could just embed the data inside your dll's code, but this defeats the purpose of having an ini file. You will need to re-built the file if you ever want to change the configuration.
You can write a post-build step to always copy an ini file to the $(OutDir) folder then it will exist if you try to run this under a debugger, but ultimately you need to include the ini file with the dll when you release this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top