【发布时间】:2010-11-02 18:30:34
【问题描述】:
如何使用 Nant (0.86) 将 .net 3.5 类库编译为 dll?
这是我目前所拥有的:
如何在 GAC 中引用系统 dll?这条线完成了似乎工作。
<include name="System.ComponentModel.DataAnnotations.dll"/>
这是我的脚本:
<?xml version="1.0"?>
<project name="MyCorp.Data" default="all">
<property name="debug" value="true" />
<target name="all"/>
<target name="clean" description="remove all build products">
<delete dir="build" if="${directory::exists('build')}" />
</target>
<target name="init">
<mkdir dir="build" />
</target>
<target name="compile"
depends="init"
description="compiles the application">
<csc target="library" output="build\${project::get-name()}.dll" debug="${debug}">
<sources>
<include name="src\MyCorp.Data\**\*.cs" />
</sources>
<references>
<include name="tools\subsonic\subsonic.dll"/>
<include name="lib\log4net\log4net.dll"/>
<include name="System.ComponentModel.DataAnnotations.dll"/>
</references>
</csc>
</target>
</project>
我通过使用JP Boodhoos post 做到了这一点
【问题讨论】:
标签: .net build-process build nant