简体   繁体   中英

How build asp.net web site using nant script?

I am using nant-0.90-alpha1 to build asp.net 3.5 web site. I am unable do that. When I am using msbuild , it throwing error saying unknown tag msbuild .
How can I build asp.net 3.5 website using nant ?

nRk

The CodeCampServer project provides good examples for a variety of tasks using nant to build MS projects including using MSBuild. However it doesn't use the msbuild task. Here's an excerpt from the common.build file from CodeCampServer:

<target name="compile" depends="init">
    <echo message="Build Directory is ${dir.build}" />
    <exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
              commandline="${file.solution} /t:Clean /p:Configuration=${project.config} /v:q" workingdir="." />
    <exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
              commandline="${file.solution} /t:Rebuild /p:Configuration=${project.config} /v:q" workingdir="." />
</target>

<msbuild>任务是NAntContrib的一部分。

The <msbuild> task must be imported into your build script. Put the following element somewhere within your <project> element.

<project ...>

    <loadtasks assembly="C:\Program Files\NAntContrib\NAnt.Contrib.Tasks.dll"/>

    ...
</project>

I believe NAnt will also pick up additional task libraries if the dlls are placed in the NAnt bin folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM