I have a mixed Java / C # project and use an ant script that contains a csc task to compile the dll. It works, but I get a warning
[csc] This task is deprecated and will be removed in a future version
[csc] of Ant. It is now part of the .NET Antlib:
[csc] http:
How can I replace the csc task? I can of course create an exec task that calls nant with the project.build file, but this is absolutely wrong.
EDIT . To clarify: I mainly use this on Linux and writing a Nant script to compile part of a C # project is not a problem. Currently I call it ant script
<target name="build-mono-stuff">
<exec executable="nant">
<arg value="build-stuff"/>
</exec>
</target>
but I was hoping to find a better solution than calling exec.
EDIT 2 So I tried to get nant from .NET AntLib to work. Here is how I guessed:
<taskdef name="mono-compile" classname="org.apache.ant.dotnet.build.NAntTask">
<classpath location="lib/ant-dotnet-1.0.jar" />
</taskdef>
<target name="build-mono-stuff">
<mono-compile buildfile="mono.build"></mono-compile>
</target>
First start:
[mono-compile] Cannot open assembly 'NAnt.exe': No such file or directory.
Then I put NAnt.exe from the Ubuntu nant package in PATH, and I get
[mono-compile] The "nant" section in the NAnt configuration file (/bin/NAnt.exe.config) is not available.
Any ideas?