Guest User

Untitled

a guest
May 26th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // ARGUMENTS
  3. ///////////////////////////////////////////////////////////////////////////////
  4.  
  5. var target = Argument("target", "Default");
  6. var configuration = Argument("configuration", "Debug");
  7.  
  8. ///////////////////////////////////////////////////////////////////////////////
  9. // SETUP / TEARDOWN
  10. ///////////////////////////////////////////////////////////////////////////////
  11.  
  12. Setup(ctx =>
  13. {
  14. // Executed BEFORE the first task.
  15. Information("Running tasks...");
  16. });
  17.  
  18. Teardown(ctx =>
  19. {
  20. // Executed AFTER the last task.
  21. Information("Finished running tasks.");
  22. });
  23.  
  24. ///////////////////////////////////////////////////////////////////////////////
  25. // TASKS
  26. ///////////////////////////////////////////////////////////////////////////////
  27.  
  28. Task("Default")
  29. .Does(() => {
  30. Information("Hello Cake!");
  31. });
  32.  
  33. Task("Clean")
  34. .Does(()=>{
  35. CleanDirectories("**/bin/"+configuration);
  36. CleanDirectories("**/obj/"+configuration);
  37. });
  38.  
  39. Task("Build")
  40. .IsDependentOn("Clean")
  41. .Does(()=>{
  42. var path = "D:\MySlnFolder\MyMainProject\MyProject.csproj";
  43. MSBuild(path,new MSBuildSettings(){
  44. Configuration = configuration
  45. });
  46. });
  47. RunTarget(target);
Add Comment
Please, Sign In to add comment