Guest User

Untitled

a guest
Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. string projectFileName = @"C:DownloadsToBeBuiltToBeBuiltToBeBuilt.csproj";
  2.  
  3. ProjectCollection pc = new ProjectCollection();
  4. pc.SetGlobalProperty("Configuration", "Debug");
  5. pc.SetGlobalProperty("Platform", "x86");
  6. pc.SetGlobalProperty("OutDir", @"C:DownloadsArtifacts");
  7.  
  8. Dictionary<string, string> globalProperty = new Dictionary<string, string>();
  9. globalProperty.Add("Configuration", "Debug");
  10. globalProperty.Add("Platform", "x86");
  11. globalProperty.Add("OutDir", @"C:DownloadsArtifacts");
  12.  
  13. BuildRequestData BuidlRequest = new BuildRequestData(projectFileName, globalProperty, "15.0", new string[] { "Build" }, null);
  14. BuildResult buildResult = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), BuidlRequest);
  15. BuildResultCode a = buildResult.OverallResult;
  16.  
  17. <?xml version="1.0" encoding="utf-8"?>
  18. <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  19. <Import Project="$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props')" />
  20. ...
  21. <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
  22. <DebugSymbols>true</DebugSymbols>
  23. <OutputPath>binx86Debug</OutputPath>
  24. <DefineConstants>DEBUG;TRACE</DefineConstants>
  25. <DebugType>full</DebugType>
  26. <PlatformTarget>x86</PlatformTarget>
  27. <ErrorReport>prompt</ErrorReport>
  28. ...
  29. </PropertyGroup>
  30. <ItemGroup>
  31. <Reference Include="System" />
  32. <Reference Include="System.Core" />
  33. <Reference Include="System.Xml.Linq" />
  34. <Reference Include="System.Data.DataSetExtensions" />
  35. <Reference Include="Microsoft.CSharp" />
  36. <Reference Include="System.Data" />
  37. <Reference Include="System.Xml" />
  38. </ItemGroup>
  39. <ItemGroup>
  40. <Compile Include="Program.cs" />
  41. <Compile Include="PropertiesAssemblyInfo.cs" />
  42. </ItemGroup>
  43. <Import Project="$(MSBuildToolsPath)Microsoft.CSharp.targets" />
  44. <Target Name="Build">
  45. <Csc Sources="@(Compile)"/>
  46. </Target>
  47. </Project>
Add Comment
Please, Sign In to add comment