Jenkins+PowerShell持续集成环境搭建(二)控制台项目

1. 新建一个名字为HelloWorld.Console的Freesyle项目;

2. 配置源码管理;

3. 编译配置:

版本:选择MSBuild4

文件:D:\CI\Config\HelloWorld.Console.msbuild

其中,“HelloWorld.Console.msbuild”文件的内容为:

 1 <?xml version="1.0" encoding="utf-8"?>
 2 <Project
 3     xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
 4     ToolsVersion="12.0"
 5     DefaultTargets="Build">    
 6   <PropertyGroup>
 7       <ProjectDir>D:\CI\HelloWorld.Console\</ProjectDir>
 8         <OutputDir>D:\CI\Output\HelloWorld.Console</OutputDir>
 9     <SolutionDir>$(ProjectDir)HelloWorld.Console.sln</SolutionDir>
10     <Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
11     <BuildPlatform Condition=" '$(BuildPlatform)' == '' ">Any CPU</BuildPlatform>
12   </PropertyGroup>
13   <ItemGroup>
14     <BuildTask Include="$(SolutionDir)">
15        <Properties>OutputPath=$(OutputDir);Configuration=$(Configuration);Platform=$(BuildPlatform)</Properties>
16     </BuildTask>
17   </ItemGroup> 
18   <Target Name="Build">
19     <MSBuild Projects="@(BuildTask)"/>
20   </Target>
21 </Project>
  • ProjectDir:项目所在目录;
  • OutputDir:项目发布目录;

posted @ 2016-11-09 16:41  VictorBu  阅读(614)  评论(0编辑  收藏  举报