I'm trying to package my wpf application as a single executable. I use Fody Costura which works fine packaging all the dll into the exe. However the exe still requires the application config file and it has to be in the same folder as the exe
So for instance if my application executeable is "myapp.exe" then the configuration file "myapp.config.exe" is required.
Can I package (embed the app config) such that only myapp.exe is required to run my application?
Can I package (embed the app config) such that only myapp.exe is required to run my application?
No, an application configuration file cannot be embedded into an assembly. At least not if you intend to use the App.config file as usual, using for example the ConfigurationManager
class.
You could remove the configuration file but if you are storing some settings in it, you will need to move these to somewhere else and also implement your application to retrieve them from there.