0

Nantを適切に使用して、asp.net、vb.net、および.net Framework 1.1を使用して開発されたasp.netプロジェクトをビルドおよびデプロイするにはどうすればよいですか?

私はこのビルドファイルで試しました:

<?xml version="1.0" ?>
<project name="MyWebProj" default="build" basedir=".">
    <description>...</description>
    <property name="debug" value="true" overwrite="false"
    />
    <property name="basename" value="MyWebProj" />
    <target name="build">
        <mkdir dir="NantBIN" />
        <vbc target="library" output="NantBIN/${basename}.dll" debug="${debug}">
            <sources>
                <include name="*.vb" />
            </sources>
        </vbc>
    </target>
</project>

そして、私はこのbatファイルを実行します:

@echo off bin\nant -t:net-1.1 -buildfile:.MyWebProjPath pause
4

2 に答える 2

0

ステップバイステップのプロセスを説明する以下のリンクを参照できます。

http://www.codeproject.com/Articles/123713/Automate-Publishing-a-WebSite-into-IIS-using-MSDep

http://www.4guysfromrolla.com/articles/120104-1.aspx

于 2012-10-05T10:39:06.547 に答える
0

まず第一に、すべての答えとアドバイスをありがとう。これが私が最終的に問題を解決した方法です。私はこれをビルドファイルとして使用します。

<?xml version="1.0"?><project name="..." default="rebuild" basedir=".">
<target name="rebuild" depends="build">
    <call target="build.copy"/>
</target>
<target name="build" description="Build all targets.">
    <call target="build.project"/>
</target>
<target name="build.project">
    <solution configuration="${configuration}" solutionfile="${solutionName}" outputdir="${expected.output}">
        <webmap>
            <map url="${webproj.url}" path="${webproj.name}" />
        </webmap>
    </solution>
</target>
<target name="build.copy">
    <copy  todir="${path.to.deploy}" overwrite="true">
        <fileset basedir=".">
            ...
            <include name="**\*.asp" />
            <include name="**\*.aspx" />
            <include name="**\*.css" />
            <include name="**\*.js" />
            ...
        </fileset>
    </copy>
</target>

そして、このbatファイルを実行します(.net Frameworkのバージョンを指定するために-t:net-1.1を設定することが重要です):

bin\nant -t:net-1.1 -buildfile:.MyWebProjPath
于 2012-10-09T13:27:47.847 に答える