I'm currently authoring a new NuGet package, but I can't get the app.config.install.xdt file right (which is the xml file that transforms app.config to suit the installed package).
The problem is inserting a <configSections> section in app.config as the first child - but only in case it is missing!
It MUST be the first child, or the application will fail with an exception (Microsoft enforcement).
If I just use the regular “InsertIfMissing” transform, the insertion takes place after any existing children, so that seems a no-go.
What can I do to solve my problem?