I'm developing a WPF application on VS 2017 Community.
I've download SlowCheetah, so this is my
App.Debug.config
<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="application.log" />
<remove name="Default" />
</listeners>
</trace>
</system.diagnostics>
</configuration>
App.Release.config
<?xml version="1.0" encoding="utf-8" ?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>
Now, whatever I choose "Debug" or "Release", nothing changes to app.config. Furthermore, clicking preview Transform to both files always show me app.config original content. Where am I wrong ?
you need to enable transforms on the config file. Right click on your project, Select Unload project. Right click again select Edit xxx.csproj.
Scroll to the bottom of the XML file.
It should look something like:
Insert the following XML:
so it now looks like
right click select reload project. Rebuild.
also ensure your config files are nested correctly, they should look like this: