NantIs A. Net build tool, Official Website: http://nant.sourceforge.net/. Nant provides a wide range of APIS, you can easily integrate and deploy. Net projects.
This is an example of deploying an ASP. NET project:
- Copy files to a specific directory to filter files
- Copy all files to a specific directory to filter files/folders.
- Set folder permissions and automatically process "Are you sure? Y/N "tip (see: http://support.microsoft.com/kb/135268)
Operation: Set post-build event command: $ (solutiondir) Build. bat in the project. For details, seeCode:
Build. BAT:
C: \ Nant \ bin \ Nant-buildfile :~ Filepath/Nant.BuildEchoY | cacls c: \ temp \ webroot \ gen_files/g <my_user_name>: F
Nant. Build:
<? XML version = "1.0" ?> < Project Name = "Frankweb" Default = "Build" Basedir = "Frankwebapp" > < Target Name = "Build" > < Echo Message = "Hello, this is Nant build ." /> < Property Name = "Dir. Base" Value = "$ {Project: Get-base-directory ()}" /> < Property Name = "Dir. bin" Value = "$ {Dir. Base} \ bin" /> < Echo Message = "The project DIR is :$ {dir. Base }" /> < Property Name = "Dir." Value = "C: \ temp \ webroot" /> < Delete Dir = "$ {Dir. }" /> < Property Name = "Dir. gen_files" Value = "$ {Dir. to} \ gen_files" /> < Foreach Item = "File" In = "$ {Dir. Bin }" Property = "File. Name" > < Echo Message = "The file in Bin :$ {file. name }" /> < If Test = "$ {Not string: ends-with (file. Name, '. pdb ')}" > < Copy File = "$ {File. name }" Todir = "$ {Dir. to} \ to_files" /> </ If > < If Test = "$ {String: ends-with (file. Name, '. pdb ')}" > < Copy File = "$ {File. name }" Todir = "$ {Dir. gen_files }" /> </ If > </ Foreach > < Copy Todir = "$ {Dir. }" > < Fileset > < Include Name = "**/*. Aspx" /> < Include Name = "**/*. Cs" /> < Include Name = "**/*. Js" /> < Include Name = "**/*. CSS" /> < Include Name = "**/*. Config" /> < Include Name = "**/*. Csproj" /> < Include Name = "**/*. Dll" /> < Include Name = "**/*. PDB" /> < Exclude Name = "**/Obj /**" /> </ Fileset > </ Copy > </ Target > </ Project >