[Mono-list] Compiling Web Service

Baptiste Guillamet baptiste.guillamet at fastconnect.fr
Thu Nov 6 09:59:57 EST 2008


Hi I create a WebService in Visual Studio and replace all references by 
Mono's DLL. I build it with Nant but when I put it in Apache (with 
mod_mono) it doesn't work. Maybe my Nant build file is not correct :

<?xml version="1.0"?>
  <project name="FastConnect.Fastest" 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" depends="clean">
      <mkdir dir="build" />
      <mkdir dir="build\bin" />
    </target>
    <target name="copy" depends="init">
      <copy todir="build">
        <fileset basedir="src\${project::get-name()}.Service">
          <include name="*.asmx" />
          <include name="*.config" />
        </fileset>
      </copy>
      <copy todir="build\bin\">
        <fileset basedir="lib\2.0\">
          <include name="System.Web.dll" />
          <include name="System.Web.Services.dll" />
          <include name="System.Data.dll" />
          <include name="System.Core.dll" />
          <include name="System.dll" />
          <include name="System.Xml.dll" />
        </fileset>
      </copy>
      <copy todir="build\bin\">
        <fileset basedir="lib\NHibernate\">
          <include name="NHibernate.dll" />
          <include name="Castle.Core.dll" />
          <include name="Castle.DynamicProxy2.dll" />
          <include name="Iesi.Collections.dll" />
          <include name="log4net.dll" />
        </fileset>
      </copy>
      <copy todir="build\bin\">
        <fileset basedir="lib\Ninject\2.0\">
          <include name="Ninject.Core.dll" />
        </fileset>
      </copy>
    </target>
   
    <target name="compile" depends="copy" description="compiles Model">
      <csc target="library" 
output="build\bin\${project::get-name()}.Model.dll" debug="${debug}">
        <sources>
          <include name="src\${project::get-name()}.Model\*.cs" />
          <exclude 
name="src\${project::get-name()}.Model\AssemblyInfo.cs" />
        </sources>
      </csc>
     
      <csc target="library" 
output="build\bin\${project::get-name()}.DAL.Contract.dll" debug="${debug}">
        <sources>
          <include name="src\${project::get-name()}.DAL.Contract\*.cs" />
          <exclude 
name="src\${project::get-name()}.DAL.Contract\AssemblyInfo.cs" />
        </sources>
        <references>
          <include name="build\bin\${project::get-name()}.Model.dll" />
        </references>
      </csc>
     
      <csc target="library" 
output="build\bin\${project::get-name()}.DAL.dll" debug="${debug}">
        <sources>
          <include name="src\${project::get-name()}.DAL\*.cs" />
          <exclude name="src\${project::get-name()}.DAL\AssemblyInfo.cs" />
        </sources>
        <references>
          <include name="lib\NHibernate\NHibernate.dll" />
          <include name="build\bin\${project::get-name()}.Model.dll" />
          <include 
name="build\bin\${project::get-name()}.DAL.Contract.dll" />
        </references>
      </csc>
     
      <csc target="library" 
output="build\bin\${project::get-name()}.Service.dll" debug="${debug}">
        <sources>
          <include name="src\${project::get-name()}.Service\*.cs" />
          <exclude 
name="src\${project::get-name()}.Service\AssemblyInfo.cs" />
        </sources>
        <references>
          <include name="lib\2.0\System.dll" />
          <include name="lib\2.0\System.Xml.dll" />
          <include name="lib\2.0\System.Data.dll" />
          <include name="lib\2.0\System.Web.dll" />
          <include name="lib\2.0\System.Web.Services.dll" />
          <include name="lib\NHibernate\NHibernate.dll" />
          <include name="lib\Ninject\2.0\Ninject.Core.dll" />
          <include name="build\bin\${project::get-name()}.Model.dll" />
          <include 
name="build\bin\${project::get-name()}.DAL.Contract.dll" />
          <include name="build\bin\${project::get-name()}.DAL.dll" />
        </references>
      </csc>
    </target>  
  </project>

Anyone can help me ?



More information about the Mono-list mailing list