Guest User

Untitled

a guest
May 2nd, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. <system.net>
  2. <mailSettings>
  3. <smtp configSource="configsmtp.config" />
  4. </mailSettings>
  5. </system.net>
  6.  
  7. <?xml version="1.0" encoding="utf-8" ?>
  8. <smtp deliveryMethod="Network">
  9. <network host="127.0.0.1" port="25" defaultCredentials="false" password="" userName ="" />
  10. </smtp>
  11.  
  12. @echo off
  13. @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.
  14. for /r %%f in (*.default) do (
  15. if not exist "%%~pnf" (echo Copying %%~pnf.default to %%~pnf & copy "%%f" "%%~pnf" /y)
  16. )
  17. echo Done.
  18.  
  19. <Project>
  20. ...
  21. <Target Name="AfterBuild">
  22. <Copy SourceFiles="web.config" DestinationFiles="obj$(Configuration)tempweb.config" />
  23. <TransformXml Source="obj$(Configuration)tempweb.config"
  24. Transform="web.$(USERNAME).config"
  25. Destination="obj$(Configuration)tempweb2.config" />
  26. <ReadLinesFromFile File="obj$(Configuration)tempweb2.config"><Output TaskParameter="Lines" ItemName="TransformedWebConfig"/></ReadLinesFromFile>
  27. <ReadLinesFromFile File="web.config"><Output TaskParameter="Lines" ItemName="UnTransformedWebConfig"/></ReadLinesFromFile>
  28. <Copy Condition=" @(UnTransformedWebConfig) != @(TransformedWebConfig) " SourceFiles="obj$(Configuration)tempweb2.config" DestinationFiles="web.config" OverwriteReadOnlyFiles="True" />
  29. </Target>
  30. </Project>
  31.  
  32. <?xml version="1.0"?>
  33. <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  34. <connectionStrings>
  35. <add name="MyDB"
  36. connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
  37. xdt:Transform="SetAttributes" xdt:Locator="Match(name)" />
  38. </connectionStrings>
  39. </configuration>
  40.  
  41. <configuration>
  42. <connectionStrings configSource="ConnectionStrings.config" />
  43. ...
  44. </configuration>
  45.  
  46. <appSettings configSource="_configs/AppSettings.config" />
  47.  
  48. <appSettings file="C:/Standard_Path_To_Configs/Standard_Name_For_Config.config">
Add Comment
Please, Sign In to add comment