首页 > Web开发 > 详细

用【Jenkins】搭建.NET自动编译测试与发布环境

时间:2018-07-23 10:14:45      阅读:233      评论:0      收藏:0      [点我收藏+]

本示例在Windows操作系统下搭建,前提条件是已安装.NET Framework.

 

1. 从 https://jenkins.io/download/下载Jenkins的Windows安装包。

2.安装好后浏览器访问 http://localhost:8080

3.配置编译和测试插件,通过点击 Jenkins -> 系统管理 -> 管理插件 打开如下页面在可选插件选项卡下选中:

技术分享图片

 然后点击直接安装。

4. 配置MSBuild的路径,通过点击 Jenkins -> 系统管理 -> 全局工具配置,找到MSBuild 配置节:

技术分享图片

输入MSBuild在服务器上的安装路径,如: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe 

完成点击Save。

如果编译的机器上没有安装Visual Studio, 在编译的过程中可能会引发MSB4019错误:

error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

对于这种情况,可以将开发机上的C:\Program Files (x86)\MSBuild文件夹之间拷贝到编译机上。

 

 

 

 

 

 *****************************
 *** Keep learning and growing. ***
 *****************************

用【Jenkins】搭建.NET自动编译测试与发布环境

原文:https://www.cnblogs.com/gangle/p/9352972.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!