码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2018-07-23 10:59:53      阅读:161      评论:0      收藏:0      [点我收藏+]

标签:framework   targe   文件夹   get   studio   window   span   sts   exists   

本示例在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自动编译测试与发布环境

标签:framework   targe   文件夹   get   studio   window   span   sts   exists   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!