Brian,

You need to manually specify the location of the application configuration
file, using the appconfig attribute on the <test> element.

We might change this in the near future to setup the appdomain using the
configuration file matching the specified assembly (if no explicit
configuration file is specified), but for now you need to specifiy the
configuration file yourself.

Gert

----- Original Message ----- 
From: "Brian Yeo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 15, 2004 9:56 AM
Subject: Nunit showing error in NAnt build but not in Nunit-GUI


> Hi everyone,
>
> I was able to run Nunit successfully in the Nunit GUI environment with no
> errors. When I ran my build script in NAnt, incorporating Nunit script,
the
> following error was displayed.
>
> The *.Nunit.config and required Dlls are located in the designated folder.
> eg. \dotnet\bin\Nunit.
>
> Can anyone help?
>
> Cheers,
> Brian
>
> ** excerpt of script
>
>   <target name="Nunit-Test-Sysmgrs" description="Nunit test System
> Managers">
>
> <if test="${property::exists('SysmgrsBinRelease')}">
> </if>
>         <echo message="Create System Managers bin ${release.state} folder"
> />
> <mkdir
>
dir="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PTA.Ente
rprise.SystemManagers2.NUnit\bin"
> />
> <mkdir
>
dir="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PTA.Ente
rprise.SystemManagers2.NUnit\bin\${release.state}"
> />
>
> <echo message="Nunit-Test-Sysmgrs"/>
>
> <attrib
>
file="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PTA.Ent
erprise.SystemManagers2.NUnit\bin\${release.state}\${PTA.Ent.sysmgrs}2.Nunit
.dll"
> readonly="${read.state}" failonerror="${failonerr}"/>
>
> <solution configuration="${release.state}"
>
solutionfile="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit
\PTA.Enterprise.SystemManagers.NUnit.sln"
>
outputdir="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PT
A.Enterprise.SystemManagers2.NUnit\bin\${release.state}"
> failonerror="${failonerr}"/>
>
> <property name="Build.pass" value="true" />
>
> <copy todir="${drive}\${src.bin.Nunit}" failonerror="${failonerr}">
>             <fileset
>
basedir="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PTA.
Enterprise.SystemManagers2.NUnit\bin\${release.state}">
> <include name="${PTA.Ent.sysmgrs}2.Nunit.dll" />
>             </fileset>
> </copy>
>
> <copy todir="${drive}\${src.bin.Nunit}" failonerror="${failonerr}">
>             <fileset
>
basedir="${drive}\${src.path.nunit}\PTA.Enterprise.SystemManagers.NUnit\PTA.
Enterprise.SystemManagers2.NUnit">
> <include name="*.config" />
>             </fileset>
> </copy>
>
> <nunit2>
> <formatter type="${outputType}" usefile="${usefile}" extension=".xml"
> outputdir="${outputdir}" />
> <formatter type="Plain" />
> <test
> assemblyname="${drive}\${src.bin.Nunit}\${PTA.Ent.sysmgrs}2.Nunit.dll" />
> </nunit2>
>
>     </target>
>
> ** log
> Nunit-Test-Sysmgrs:
>
>      [echo] Create System Managers bin release folder
>      [echo] Nunit-Test-Sysmgrs
>    [attrib] Setting file attributes for 1 files to Normal.
> [solution] Starting solution build.
> [solution] Building 'PTA.Enterprise.SystemManagers2.NUnit' [release]...
>      [copy] Copying 1 file to 'C:\DotNet\bin\Nunit'.
>    [nunit2] Tests run: 20, Failures: 20, Not run: 0, Time: 0.5 seconds
>
> Failures:
> 1)
> PTA.Enterprise.SystemManagers2.NUnit.Managers.ExceptionManager.Constructor
:
> System.InvalidOperationException : The key 'connectionString' does not
exist
> in
> the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.ExceptionManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.ExceptionManager.Constructor
> ()
>
> 2)
>
PTA.Enterprise.SystemManagers2.NUnit.Managers.ExceptionManager.WriteExceptio
n
> : Object reference not set to an instance of an object.
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.ExceptionManager.WriteExcept
> ion()
>
> 3) PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.Constructor
:
> Syst
> em.InvalidOperationException : The key 'connectionString' does not exist
in
> the
> appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.StateManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.Constructor()
>
> 4) PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.StateSave :
> System
> .InvalidOperationException : The key 'connectionString' does not exist in
> the ap
> pSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.StateManager..ctor()
>    at
PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.StateSave()
>
> 5) PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.StateLoad :
> System
> .InvalidOperationException : The key 'connectionString' does not exist in
> the ap
> pSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.StateManager..ctor()
>    at
PTA.Enterprise.SystemManagers2.NUnit.Managers.StateManager.StateLoad()
>
> 6)
>
PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.Construc
t
> or : System.InvalidOperationException : The key 'connectionString' does
not
> exis
> t in the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.AuthenticationManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.Constr
> uctor()
>
> 7)
>
PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.GetPassw
o
> rd : System.InvalidOperationException : The key 'connectionString' does
not
> exis
> t in the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.AuthenticationManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.GetPas
> sword()
>
> 8)
>
PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.Connect
> :
> System.InvalidOperationException : The key 'connectionString' does not
exist
> in
> the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.AuthenticationManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.Connec
> t()
>
> 9)
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.GetKey
:
> System.InvalidOperationException : The key 'connectionString' does not
exist
> in
> the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.AuthenticationManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.GetKey
> ()
>
> 10)
>
PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.SetPassw
> ord : System.InvalidOperationException : The key 'connectionString' does
not
> exi
> st in the appSettings configuration section.
>    at System.Configuration.AppSettingsReader.GetValue(String key, Type
type)
>    at PTA.Enterprise.SystemManagers.Managers.AuthenticationManager..ctor()
>    at
> PTA.Enterprise.SystemManagers2.NUnit.Managers.AuthenticationManager.SetPas
> sword()
>
>
>
>
> Regards,
> Brian Yeo
>
> _________________________________________________________________
> Need plastic Surgery? Apply for a Virgin Credit Card. Click here:
>
http://ad.doubleclick.net/clk;9466596;9687279;s?http://au.virginmoney.com/virgin/publish.nsf/Content/VM+HomePage?OpenDocument&source=P08
>
>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to