Continuous system integration is a good thing. but once the release of the program, can not be built or built after the discovery function is not normal, it is not very good. Let's talk about the construction of this period of time.
Let's talk about the problems these days . This is the beginning of the project in common
Code Issues
1 Span lang= "ZH-CN" style= "Font-family:simsun" > in SVN Span lang= "ZH-CN" style= "Font-family:simsun" > on checkout The code for
- 1.1 This problem is more for adding and deleting the file does not have the overall code, resulting in a local file does not exist, but the overall still.
- 1.2 No overall compile code, resulting in upload error code
- 1.3 class Library versions are inconsistent, resulting in conflicting compilation solutions
The above three types are common problems with basic build failures.
2 missing three-party dependency packages and other DLLs in the project
then the success of the build does not mean that our program is running properly. Also depends on whether the function is normal. This involves whether the reference to the class library is normal. Here we will third-party public packages and our own encapsulated class libraryused aNuGetManagement Pack has been managed, creating aPackagesPackage, install our class library and automatically introduceDLLput it in thePackages, in the upload Packageto theSVNso that the program is builtPackagesTo find references in the. Of course for some, such as through reflectionDLLyou need to use the built-in commandsit's automatically copied. Let's do a demonstration here.
such as the system Basic architecture diagram
The total includesIBLL,Idal,WEB, and some factories. So when you build it, you need toDAL,BLLas welldalfactory,Bllfacotryin theDLLpackaged intoWebthe layer. so it's necessary to put their build path intoWEBlayer, this one invsThere is no problem at all. and inJenkinsbuild, I didn't think of building all of these projects at first. When the build is found to be successful, the task item is basically no problem. when accessing the function, but found that the data are not phenomenon,when inWebproblems with remote calling methods found during debugging
View the generated DLL missing DAL , Dalfacotry , is a serious problem. The build project is added, and the build project cannot be generated to the Web layer .
The basic idea is
- 1 Framing Other engineering documents will DLL generate to source code total.
- 2 The source code of the dll use bat files are copied to the published project
- 3 will all the dependencies DLL are put in packge , reference packge in DLL
in this way, you will not go to the search, nor rely on the system DLL , avoid missing.
Building the BLL layer and the DAL layer
Building dalfacotry and Web tier Services
Build client side and add DLL copy batch commands in other solutions
Batch File command, note that the file path is best not to have spaces, otherwise Jenkins the command is not recognized. The command is to copy the DLL in the source code to the bin in the sent file.
Bat file to view the previous article
Copies of DLLs
Summary:
Jenkins compilation is a compilation of only the dependencies in a dependent project DLL or (the reference in the DLL ), so to DAl These are not direct references, you need to find a way to build. Does it output files under these files, as if they were to be generated into the source code, and then copied directly. The basic idea is over, and I hope to have some understanding of you.
Jenkins continues to build