I have created a build file (script.build) and everything worked fine. Then
I stripped out the properties and included them in another file called
usa.config.

 

I put an <include buildfile="usa.config"> then I tried to use the properties
and I keep getting the following error:Property has not been set.  Below is
the code for the two files can someone take a look and tell me what I am
doing wrong. I am sure it is something simple:

 

Script build

<?xml version="1.0" encoding="utf-8" ?>

<project name="NAntTest" default="all">

  

  <include buildfile="usadev.config"/>

  

  <property name="bat.setup"       value="C:\svn\sld\setup.bat"/>

  <property name="bat.teardown"       value="C:\svn\sld\teardown.bat"/>

  

 

  <echo message="this is the :   ${dev.website.folder.name}"/>

 

  <target name="SetUpC">

    <script language="C#">

      <code>

        <![CDATA[ 

        

         public static void ScriptMain(Project project) 

    {

    //create a batch file

      string val = @project.Properties["bat.setup"];

      FileInfo fi = new FileInfo(val);

      StreamWriter sw = fi.CreateText();

      //The List Of Operations you want to execute.

      sw.WriteLine("iisweb /stop " +
project.Properties["dev.website.folder.name"]);

      sw.WriteLine("regsvr32 -u AStars.dll");

 

sw.Close();

}

        

        ]]>

      </code>

    </script>

 

    <echo message="Target Completed C#"/>

 

  </target>

 

 

  <target name="TearDownC">

    <script language="C#">

      <code>

        <![CDATA[ 

        

         public static void ScriptMain(Project project) 

    {

    //create a batch file

      string val = @project.Properties["bat.teardown"];

      FileInfo fi = new FileInfo(val);

      StreamWriter sw = fi.CreateText();

      //The List Of Operations you want to execute.

      sw.WriteLine("iisweb /start " +
project.Properties["dev.website.folder.name"]);

      sw.WriteLine("regsvr32 AStars.dll");

 

sw.Close();

}

        

        ]]>

      </code>

    </script>

 

    <echo message="Target Completed C#"/>

 

  </target>

 

</project>

 

 

Usadev.config

 

<?xml version="1.0" encoding="utf-8" ?>

<project xmlns="http://nant.sf.net/release/0.85/nant.xsd";>

 

 

  <!--

 
############################################################################
####################

      Dev Properties

 
############################################################################
####################

      -->

 

  <property name="app.debug"
value="true" /> <!--Generic for any app-->

  <property name="dev.server.ip"
value="http://000.000.000"/>

  <property name="dev.app.extension"          value="Devd\www_sites\dev" />

  <property name="dev.website.folder.name"       value="aspinternal" />

  <property name="dev.website.name"           value="NameOfWebSite" />

  <property name="dev.domain"                 value="usac-sld" />

  <property name="dev.username"               value="test1" />

  <property name="dev.password"               value="test2" />

  <property name="dev.map.drive"               value="c:\test" />

  

  

 

 

  <!--

 
############################################################################
####################

      SVN Properties

 
############################################################################
####################

      -->

  <property name="svn.src.tag.dir" value=""/>

  <property name="svn.src.username" value="ZacharyWheeler"/>

  <property name="svn.src.password" value="zwheeler"/>

  <property name="svn.src.dest.dir" value="C:\svnTag1\usac\tags"/>

  <property name="svn.src.revision" value="0"/>

  <!--

 
############################################################################
####################

      Build File Name Property

 
############################################################################
####################

      -->

  <property name="buildFile.name" value="test.build"/>

  

</project>

 

 

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to