Hi,
I am trying to automate creation of build file for NANT using solution task (formerly Slingshot of NANTContrib). The steps i have followed till now are as under:
I am successfully able to get output file.
==============================================================
<?xml version="1.0"?>
<project name="SlingShot Example" default="BuildSolution" basedir=".">
<description>SlingShot Example</description>
<project name="SlingShot Example" default="BuildSolution" basedir=".">
<description>SlingShot Example</description>
<property name="solutionName" value="TestConsoleApp" readonly="true"/>
<target name="BuildSolution">
<!-- Parse the specified Solution file -->
<!-- Create a Nant build file from that file. -->
<solution solutionfile="TestConsoleApp.sln" configuration="debug" outputdir="c:\temp" />
</target>
<!-- Parse the specified Solution file -->
<!-- Create a Nant build file from that file. -->
<solution solutionfile="TestConsoleApp.sln" configuration="debug" outputdir="c:\temp" />
</target>
</project>
==============================================================
I have the following questions:
1) How do i build dll out of the solution for NUNIT specific files or solution. Does someone has example of using NUnit with NAnt. In the help documents it says the following
In order to run a test assembly built with NUnit 2.0 or 2.1 using the NAnt <nunit2> task , you must add the following node to your test config file :
--------------------------------------------------------------------------------------------------------------------
<configuration>
...
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
<bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.0.0" />
<bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
...
</configuration>
...
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="nunit.framework" publicKeyToken="96d09a1eb7f44a77" culture="Neutral" />
<bindingRedirect oldVersion="2.0.6.0" newVersion="2.2.0.0" />
<bindingRedirect oldVersion="2.1.4.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
...
</configuration>
--------------------------------------------------------------------------------------------------------------------
Does it mean in the build file ?? Where is test config file located, i am not able to find it. Can someone please throw some light on this.
2) To build what I files solution task uses. I mean if i am taking file input from the user, which all files are necessary for this to succeed. Only taking solution file will it be able to build the project ??
I would be grateful for providing answers to the above question.
Thanks in the anticipation that i will get some hints to solve the issues listed above.
Cheers!!
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!
