Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <system.net>
- <mailSettings>
- <smtp configSource="configsmtp.config" />
- </mailSettings>
- </system.net>
- <?xml version="1.0" encoding="utf-8" ?>
- <smtp deliveryMethod="Network">
- <network host="127.0.0.1" port="25" defaultCredentials="false" password="" userName ="" />
- </smtp>
- @echo off
- @REM Makes copies of all .default files without the .default extension, only if it doesn't already exist. Does the same recursively through all child folders.
- for /r %%f in (*.default) do (
- if not exist "%%~pnf" (echo Copying %%~pnf.default to %%~pnf & copy "%%f" "%%~pnf" /y)
- )
- echo Done.
- <Project>
- ...
- <Target Name="AfterBuild">
- <Copy SourceFiles="web.config" DestinationFiles="obj$(Configuration)tempweb.config" />
- <TransformXml Source="obj$(Configuration)tempweb.config"
- Transform="web.$(USERNAME).config"
- Destination="obj$(Configuration)tempweb2.config" />
- <ReadLinesFromFile File="obj$(Configuration)tempweb2.config"><Output TaskParameter="Lines" ItemName="TransformedWebConfig"/></ReadLinesFromFile>
- <ReadLinesFromFile File="web.config"><Output TaskParameter="Lines" ItemName="UnTransformedWebConfig"/></ReadLinesFromFile>
- <Copy Condition=" @(UnTransformedWebConfig) != @(TransformedWebConfig) " SourceFiles="obj$(Configuration)tempweb2.config" DestinationFiles="web.config" OverwriteReadOnlyFiles="True" />
- </Target>
- </Project>
- <?xml version="1.0"?>
- <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
- <connectionStrings>
- <add name="MyDB"
- connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
- xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
- </connectionStrings>
- </configuration>
- <configuration>
- <connectionStrings configSource="ConnectionStrings.config" />
- ...
- </configuration>
- <appSettings configSource="_configs/AppSettings.config" />
- <appSettings file="C:/Standard_Path_To_Configs/Standard_Name_For_Config.config">
Add Comment
Please, Sign In to add comment