Svn+jenkins+msbuild for Continuous integration

Source: Internet
Author: User

Preparatory work:

    1. Install SVN:VISUALSVN, configure SVN's environment

Use SVN to manage the source code.

Similar to this:

    1. Install Jenkins download a jenkin.war on Tomcat, similar to this:

Run up

    1. And then it's the VS2013 you can install MSbuild or the VS2013 I use.

The default installation is this path:

    1. Then put the MSBuild plugin on Jenkins

5. Create a new job in Jenkins

6. Source Code Control SVN

7. Build with Msbuild4

If the web system

MSbuild Build File:

Xxxxx. Web\xxxx. Web.csproj

Build Parameters:

/t:resolvereferences; compile/t:_copywebapplication/p:visualstudioversion=12.0/p:configuration=release/p: WebProjectOutputDir=D:\ Tzcstest/p:outputpath=d:\ddd\bin

Where Webprojectoutputdir is the publishing path of the Web site;

OutputPath is the DLL path for the compiled output.

8. After saving, click Build Now

Difficulties

The difficulty in this, in addition to the SVN and Jenkin installation (this can be found on the Internet solution), is about the seventh step of the parameter configuration: if the implementation of automatic deployment to the appropriate path of the problem:

One article is worth recommending: http://www.infoq.com/cn/articles/MSBuild-1/

Suggest a good look

In VS2013, the configuration file is placed in:XXXX. Web.csproj This inside, but you open this file, you can not see Tagert or Propert, is actually quoted in this way

<import project= "$ (msbuildbinpath) \microsoft.csharp.targets"/>

<import project= "$ (vstoolspath) \webapplications\microsoft.webapplication.targets" Condition= "' $ (VSToolsPath) ' ! = ' "/>

<import project= "$ (MSBuildExtensionsPath32) \microsoft\visualstudio\v10.0\webapplications\ Microsoft.WebApplication.targets "condition=" false "/>

So you're actually going to find this file Microsoft.WebApplication.targets

But don't try to find the ITEM in this file is the configuration of those address variables, because these are in the DLL file, not allowed to modify, of course, this file Microsoft.WebApplication.targets can not be changed, but we could be overridden by parameters

/T is target/p is the propert followed by their name, that is, you want to find the target or attribute, and then assign the value

/t:resolvereferences; compile/t:_copywebapplication/p:visualstudioversion=12.0/p:configuration=release/p: WebProjectOutputDir=D:\ Tzcstest/p:outputpath=d:\ddd\bin

Svn+jenkins+msbuild for Continuous integration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.