Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an assembly reference to a script task in NAnt

I'm struggling to get NAnt's script task to pick up a reference to a DLL outside the working folder.

<target name="UpdateDBs">
  <script language="c#">
    <references failonempty="true">
      <lib>
        <include name="\\srv-dev\sharedassemblies\OurCompany\DataTransfer\OurCompany.DataTransfer.dll" />
      </lib>
    </references>
    <imports>
        <import namespace="OurCompany.DataTransfer.WebDocs" />
    </imports>
    <code>
        <![CDATA[
            public static void ScriptMain(Project project)
            {
                WebDocDbPostbuildUpdater.UpdateSqlScripts(@"\\srv-dev\integration\OurProductSetup6.4\workingdirectory", new System.Version(6, 4));
            }
        ]]>
    </code>
  </script>
</target>

I get a build error:

The fileset specified is empty after scanning '\srv-dev\integration\OurProductSetup6.4' for: NAnt.Core.StringCollectionWithGoodToString:

I've tried a few different variations on this but got nowhere. Also the documentation doesn't seem to make this particularly obvious.

Any help appreciated.

like image 781
tomfanning Avatar asked Mar 20 '26 02:03

tomfanning


1 Answers

Sod's law. I just got the path wrong.

<references failonempty="true">
  <include name="\\srv-dev\sharedassemblies\OurCompany\DataTransfer\OurCompany.DataTransfer.dll" />
</references>
like image 197
tomfanning Avatar answered Mar 22 '26 12:03

tomfanning