Preparatory work:
- Install SVN:VISUALSVN, configure SVN's environment
Use SVN to manage the source code.
Similar to this:
- Install Jenkins download a jenkin.war on Tomcat, similar to this:
Run up
- And then it's the VS2013 you can install MSbuild or the VS2013 I use.
The default installation is this path:
- 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