I have a application that must run on any plain Windows installation (from Vista up to 10).
On Vista you got framework 3.5, on Win10 there's framework 4.6 installed.
To run on both, the application must target different frameworks.
Therefore I made use of multiple supportedRuntime
entries in app.config
, which makes this possible - works perfect.
Now I got a second problem, I have to ship app.config
together with the application.
This is a problem, because of the way the application is distributed, app.config
can get lost and the whole thing blows up.
So the idea was to embed app.config
into the executable, against the principle of the file "user should be able to change it".
In this case, the user should not be able to change it, because it would no longer work.
Here's what I found so far:
How do you embed app.config in C# projects?
How do I compile my App.config into my exe in a VS2010 C# console app?
The essence is 'you can't do that'.
So the question is:
Is there either a way to embed app.config
or is there another way to specify supportedRuntime
somewhere else than app.config
?
There seems to be no compiler switches that addresses the configuration.
Are there further tools to manipulate the configuration?