Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string projectFileName = @"C:DownloadsToBeBuiltToBeBuiltToBeBuilt.csproj";
- ProjectCollection pc = new ProjectCollection();
- pc.SetGlobalProperty("Configuration", "Debug");
- pc.SetGlobalProperty("Platform", "x86");
- pc.SetGlobalProperty("OutDir", @"C:DownloadsArtifacts");
- Dictionary<string, string> globalProperty = new Dictionary<string, string>();
- globalProperty.Add("Configuration", "Debug");
- globalProperty.Add("Platform", "x86");
- globalProperty.Add("OutDir", @"C:DownloadsArtifacts");
- BuildRequestData BuidlRequest = new BuildRequestData(projectFileName, globalProperty, "15.0", new string[] { "Build" }, null);
- BuildResult buildResult = BuildManager.DefaultBuildManager.Build(new BuildParameters(pc), BuidlRequest);
- BuildResultCode a = buildResult.OverallResult;
- <?xml version="1.0" encoding="utf-8"?>
- <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)$(MSBuildToolsVersion)Microsoft.Common.props')" />
- ...
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>binx86Debug</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>x86</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- ...
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Program.cs" />
- <Compile Include="PropertiesAssemblyInfo.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)Microsoft.CSharp.targets" />
- <Target Name="Build">
- <Csc Sources="@(Compile)"/>
- </Target>
- </Project>
Add Comment
Please, Sign In to add comment