There are Web.config and Web.debug.config and Web.release.config files in my visual studio solution window.
I want to set different email configurations for release and debug.
So I set Web.debug.config file
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<network host="localhost" port="587" defaultCredentials="true"/>
<specifiedPickupDirectory pickupDirectoryLocation="C:\Temp\Mail\Debug"/>
</smtp>
</mailSettings>
</system.net>
And I set my Web.release.config
<system.net>
<mailSettings>
<smtp deliveryMethod="SpecifiedPickupDirectory">
<network host="localhost" port="587" defaultCredentials="true"/>
<specifiedPickupDirectory pickupDirectoryLocation="C:\Temp\Mail\Release"/>
</smtp>
</mailSettings>
</system.net>
When I run the applciaitons, my settings does not load to SmtpClient object.
Why does not take settings from Web.debug.config

web.debug.configdoesn't contain any transformations. You could convert it into a transformation by addingxdt:Transform="Replace" xdt:Locator="Match(name)"to thesmtpelement